Skip to content

Commit 3d918fd

Browse files
committed
style: fix box-info ts errors
1 parent fccf341 commit 3d918fd

File tree

3 files changed

+17
-30
lines changed

3 files changed

+17
-30
lines changed

library/angular-admin-lte/src/lib/box-info/box-info.component.ts

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,36 @@
11
import { Component, OnInit, Input, ContentChild } from '@angular/core';
2+
23
import { BoxInfoContentDirective, BoxInfoFooterDirective, BoxInfoHeaderDirective } from './box-info.directive';
34

4-
/*
5-
*
6-
*/
5+
76
@Component({
87
selector: 'mk-box-info',
98
styleUrls: ['./box-info.component.css'],
109
templateUrl: './box-info.component.html'
1110
})
1211
export class BoxInfoComponent implements OnInit {
13-
public progressBarBg: string;
14-
15-
@Input() public backgroundColor: string;
12+
@Input() public backgroundColor?: string;
1613
@Input() public contentStyleClass = 'info-box-number';
17-
@Input() public contentColor: string;
18-
@Input() public footer: string;
19-
@Input() public footerColor: string;
14+
@Input() public contentColor?: string;
15+
@Input() public footer?: string;
16+
@Input() public footerColor?: string;
2017
@Input() public footerStyleClass = 'progress-description';
21-
@Input() public header: string;
22-
@Input() public headerColor: string;
18+
@Input() public header?: string;
19+
@Input() public headerColor?: string;
2320
@Input() public headerStyleClass = 'info-box-text';
24-
@Input() public iconBackgroundColor: string;
21+
@Input() public iconBackgroundColor?: string;
2522
@Input() public iconColor = '#fff';
2623
@Input() public iconStyleClass = 'ion ion-bag';
27-
@Input() public progressWidth: number;
24+
@Input() public progressWidth?: number;
2825
@Input() public styleClass = 'info-box';
2926

30-
@ContentChild(BoxInfoHeaderDirective, /* TODO: add static flag */ {}) public boxInfoHeaderDirective: BoxInfoHeaderDirective;
31-
@ContentChild(BoxInfoFooterDirective, /* TODO: add static flag */ {}) public boxInfoFooterDirective: BoxInfoFooterDirective;
32-
@ContentChild(BoxInfoContentDirective, /* TODO: add static flag */ {}) public boxInfoContentDirective: BoxInfoContentDirective;
27+
@ContentChild(BoxInfoHeaderDirective) public boxInfoHeaderDirective?: BoxInfoHeaderDirective;
28+
@ContentChild(BoxInfoFooterDirective) public boxInfoFooterDirective?: BoxInfoFooterDirective;
29+
@ContentChild(BoxInfoContentDirective) public boxInfoContentDirective?: BoxInfoContentDirective;
30+
31+
public progressBarBg?: string;
3332

34-
/**
35-
* @method ngOnInit
36-
*/
37-
ngOnInit() {
33+
ngOnInit(): void {
3834
if (!this.backgroundColor) {
3935
this.progressBarBg = this.iconBackgroundColor;
4036
}

library/angular-admin-lte/src/lib/box-info/box-info.directive.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
import { Directive } from '@angular/core';
22

3-
/*
4-
*
5-
*/
3+
64
@Directive({
75
/* tslint:disable-next-line:directive-selector */
86
selector: 'mk-box-info-content'
97
})
108
export class BoxInfoContentDirective {}
119

1210

13-
/*
14-
*
15-
*/
1611
@Directive({
1712
/* tslint:disable-next-line:directive-selector */
1813
selector: 'mk-box-info-footer'
1914
})
2015
export class BoxInfoFooterDirective {}
2116

2217

23-
/*
24-
*
25-
*/
2618
@Directive({
2719
/* tslint:disable-next-line:directive-selector */
2820
selector: 'mk-box-info-header'

library/angular-admin-lte/src/lib/box-info/box-info.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

44
import { ColorModule } from '../color/color.module';
5-
65
import { BoxInfoHeaderDirective, BoxInfoContentDirective, BoxInfoFooterDirective } from './box-info.directive';
76
import { BoxInfoComponent } from './box-info.component';
87

0 commit comments

Comments
 (0)