This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +11
-17
lines changed Expand file tree Collapse file tree 7 files changed +11
-17
lines changed Original file line number Diff line number Diff line change 5
5
MdcCheckboxModule ,
6
6
MdcDialogModule ,
7
7
MdcDrawerModule ,
8
- MdcElevationModule ,
9
8
MdcFabModule ,
10
9
MdcFormFieldModule ,
11
10
MdcIconToggleModule ,
@@ -19,9 +18,7 @@ import {
19
18
MdcSwitchModule ,
20
19
MdcTabModule ,
21
20
MdcTextfieldModule ,
22
- MdcThemeModule ,
23
21
MdcToolbarModule ,
24
- MdcRippleModule ,
25
22
// } from '@angular-mdc/web';
26
23
} from '../lib/public_api' ;
27
24
@@ -32,7 +29,6 @@ import {
32
29
MdcCheckboxModule ,
33
30
MdcDialogModule ,
34
31
MdcDrawerModule ,
35
- MdcElevationModule ,
36
32
MdcFabModule ,
37
33
MdcFormFieldModule ,
38
34
MdcIconToggleModule ,
@@ -46,9 +42,7 @@ import {
46
42
MdcSwitchModule ,
47
43
MdcTabModule ,
48
44
MdcTextfieldModule ,
49
- MdcThemeModule ,
50
45
MdcToolbarModule ,
51
- MdcRippleModule ,
52
46
]
53
47
} )
54
48
export class DemoMaterialModule { }
Original file line number Diff line number Diff line change @@ -4,12 +4,14 @@ import { MdcRippleModule } from './ripple/index';
4
4
import { MdcMaterialIconModule } from './material-icon/index' ;
5
5
import { MdcTypographyModule } from './typography/index' ;
6
6
import { MdcElevationModule } from './elevation/index' ;
7
+ import { MdcThemeModule } from './theme/index' ;
7
8
8
9
const CORE_DIRECTIVES = [
9
10
MdcElevationModule ,
10
11
MdcMaterialIconModule ,
11
12
MdcTypographyModule ,
12
13
MdcRippleModule ,
14
+ MdcThemeModule ,
13
15
] ;
14
16
15
17
@NgModule ( {
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ export * from './elevation/index';
2
2
export * from './material-icon/index' ;
3
3
export * from './typography/index' ;
4
4
export * from './ripple/index' ;
5
+ export * from './theme/index' ;
File renamed without changes.
Original file line number Diff line number Diff line change @@ -6,30 +6,28 @@ import {
6
6
Renderer2 ,
7
7
SimpleChange ,
8
8
} from '@angular/core' ;
9
- import { toBoolean } from '../common' ;
9
+ import { toBoolean } from '../../ common' ;
10
10
11
11
@Directive ( {
12
12
selector : '[mdc-theme-dark]'
13
13
} )
14
14
export class MdcThemeDark implements OnChanges {
15
- private nativeEl : ElementRef ;
16
- private _mdcThemeDark : boolean ;
15
+ private mdcThemeDark_ : boolean ;
17
16
18
17
@Input ( 'mdc-theme-dark' ) mdcThemeDark : boolean ;
19
18
20
19
constructor (
21
- private _renderer : Renderer2 ,
22
- private _root : ElementRef ) {
23
- this . nativeEl = this . _root . nativeElement ;
20
+ private renderer_ : Renderer2 ,
21
+ public elementRef : ElementRef ) {
24
22
}
25
23
26
24
ngOnChanges ( changes : { [ key : string ] : SimpleChange } ) {
27
25
let change = changes [ 'mdcThemeDark' ] ;
28
26
29
27
if ( ! toBoolean ( change . currentValue ) ) {
30
- this . _renderer . removeClass ( this . nativeEl , 'mdc-theme--dark' ) ;
28
+ this . renderer_ . removeClass ( this . elementRef . nativeElement , 'mdc-theme--dark' ) ;
31
29
} else {
32
- this . _renderer . addClass ( this . nativeEl , 'mdc-theme--dark' ) ;
30
+ this . renderer_ . addClass ( this . elementRef . nativeElement , 'mdc-theme--dark' ) ;
33
31
}
34
32
}
35
33
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { MdcDialogModule } from './dialog/index';
8
8
import { MdcDrawerModule } from './drawer/index' ;
9
9
import { MdcFabModule } from './fab/index' ;
10
10
import { MdcFormFieldModule } from './form-field/index' ;
11
+ import { MdcIconModule } from './icon/index' ;
11
12
import { MdcIconToggleModule } from './icon-toggle/index' ;
12
13
import { MdcLinearProgressModule } from './linear-progress/index' ;
13
14
import { MdcListModule } from './list/index' ;
@@ -18,7 +19,6 @@ import { MdcSnackbarModule } from './snackbar/index';
18
19
import { MdcSwitchModule } from './switch/index' ;
19
20
import { MdcTabModule } from './tabs/index' ;
20
21
import { MdcTextfieldModule } from './textfield/index' ;
21
- import { MdcThemeModule } from './theme/index' ;
22
22
import { MdcToolbarModule } from './toolbar/index' ;
23
23
24
24
const MATERIAL_MODULES = [
@@ -30,6 +30,7 @@ const MATERIAL_MODULES = [
30
30
MdcDrawerModule ,
31
31
MdcFabModule ,
32
32
MdcFormFieldModule ,
33
+ MdcIconModule ,
33
34
MdcIconToggleModule ,
34
35
MdcLinearProgressModule ,
35
36
MdcListModule ,
@@ -40,7 +41,6 @@ const MATERIAL_MODULES = [
40
41
MdcSwitchModule ,
41
42
MdcTabModule ,
42
43
MdcTextfieldModule ,
43
- MdcThemeModule ,
44
44
MdcToolbarModule ,
45
45
] ;
46
46
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ export * from './snackbar/index';
19
19
export * from './switch/index' ;
20
20
export * from './tabs/index' ;
21
21
export * from './textfield/index' ;
22
- export * from './theme/index' ;
23
22
export * from './toolbar/index' ;
24
23
25
24
export * from './cdk/overlay/index' ;
You can’t perform that action at this time.
0 commit comments