This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 11import { NgModule } from '@angular/core' ;
22
3+ import { ThemeModule } from './theme' ;
34import { ButtonModule } from './button' ;
45import { CardModule } from './card' ;
56import { CheckboxModule } from './checkbox' ;
@@ -17,6 +18,7 @@ import { TextfieldModule } from './textfield';
1718import { ToolbarModule } from './toolbar' ;
1819import { TypographyModule } from './typography' ;
1920
21+ export * from './theme' ;
2022export * from './button' ;
2123export * from './card' ;
2224export * from './checkbox' ;
@@ -35,15 +37,16 @@ export * from './toolbar';
3537export * from './typography' ;
3638
3739const MATERIAL_MODULES = [
40+ ThemeModule ,
3841 ButtonModule ,
3942 CardModule ,
4043 CheckboxModule ,
4144 ElevationModule ,
4245 FabModule ,
43- PlatformModule ,
4446 FormFieldModule ,
4547 LinearProgressModule ,
4648 MenuModule ,
49+ PlatformModule ,
4750 RadioModule ,
4851 RippleModule ,
4952 SnackbarModule ,
Original file line number Diff line number Diff line change 1+ import { NgModule } from '@angular/core' ;
2+
3+ import { ThemeDark } from './theme-dark.directive' ;
4+
5+ const THEME_DIRECTIVES = [
6+ ThemeDark
7+ ] ;
8+
9+ @NgModule ( {
10+ exports : [ THEME_DIRECTIVES ] ,
11+ declarations : [ THEME_DIRECTIVES ] ,
12+ } )
13+ export class ThemeModule { }
Original file line number Diff line number Diff line change 1+ import {
2+ Directive ,
3+ HostBinding ,
4+ } from '@angular/core' ;
5+
6+ @Directive ( {
7+ selector : '[mdc-theme-dark]'
8+ } )
9+ export class ThemeDark {
10+ @HostBinding ( 'class.mdc-theme--dark' ) classThemeDark : string = 'mdc-theme--dark' ;
11+ }
You can’t perform that action at this time.
0 commit comments