This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typography): MdcTypography moved to MdcCoreModule (#244)
* feat(typography): MdcTypography moved to MdcCoreModule Reference issue #243 BREAKING CHANGE: Remove `MdcTypographyModule` from your code, and if necessary add an import of `MdcCoreModule`.
- Loading branch information
Showing
13 changed files
with
191 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { MdcMaterialIconModule } from './material-icon/index'; | ||
import { MdcTypographyModule } from './typography/index'; | ||
|
||
@NgModule({ | ||
imports: [MdcMaterialIconModule, MdcTypographyModule], | ||
exports: [MdcMaterialIconModule, MdcTypographyModule], | ||
}) | ||
export class MdcCoreModule { } | ||
|
||
export * from './public_api'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { MdcMaterialIcon } from './material-icon.directive'; | ||
|
||
@NgModule({ | ||
exports: [MdcMaterialIcon], | ||
declarations: [MdcMaterialIcon], | ||
}) | ||
export class MdcMaterialIconModule { } | ||
|
||
export * from './material-icon.directive'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { | ||
Directive, | ||
HostBinding, | ||
} from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[material-icon]' | ||
}) | ||
export class MdcMaterialIcon { | ||
@HostBinding('class.material-icons') isHostClass = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './material-icon/index'; | ||
export * from './typography/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { | ||
MdcAdjustMarginDirective, | ||
MdcBody1Directive, | ||
MdcBody2Directive, | ||
MdcButtonDirective, | ||
MdcCaptionDirective, | ||
MdcDisplay1Directive, | ||
MdcDisplay2Directive, | ||
MdcDisplay3Directive, | ||
MdcDisplay4Directive, | ||
MdcHeadlineDirective, | ||
MdcSubheading1Directive, | ||
MdcSubheading2Directive, | ||
MdcTitleDirective, | ||
MdcTypography, | ||
} from './typography.directive'; | ||
|
||
const TYPOGRAPHY_DIRECTIVES = [ | ||
MdcAdjustMarginDirective, | ||
MdcBody1Directive, | ||
MdcBody2Directive, | ||
MdcButtonDirective, | ||
MdcCaptionDirective, | ||
MdcDisplay1Directive, | ||
MdcDisplay2Directive, | ||
MdcDisplay3Directive, | ||
MdcDisplay4Directive, | ||
MdcHeadlineDirective, | ||
MdcSubheading1Directive, | ||
MdcSubheading2Directive, | ||
MdcTitleDirective, | ||
MdcTypography, | ||
]; | ||
|
||
@NgModule({ | ||
exports: [TYPOGRAPHY_DIRECTIVES], | ||
declarations: [TYPOGRAPHY_DIRECTIVES], | ||
}) | ||
export class MdcTypographyModule { } | ||
|
||
export * from './typography.directive'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { | ||
Directive, | ||
HostBinding, | ||
} from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[mdc-typography]' | ||
}) | ||
export class MdcTypography { | ||
@HostBinding('class.mdc-typography') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-adjust-margin]' | ||
}) | ||
export class MdcAdjustMarginDirective { | ||
@HostBinding('class.mdc-typography--adjust-margin') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-display4]' | ||
}) | ||
export class MdcDisplay4Directive { | ||
@HostBinding('class.mdc-typography--display4') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-display3]' | ||
}) | ||
export class MdcDisplay3Directive { | ||
@HostBinding('class.mdc-typography--display3') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-display2]' | ||
}) | ||
export class MdcDisplay2Directive { | ||
@HostBinding('class.mdc-typography--display2') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-display1]' | ||
}) | ||
export class MdcDisplay1Directive { | ||
@HostBinding('class.mdc-typography--display1') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-headline]' | ||
}) | ||
export class MdcHeadlineDirective { | ||
@HostBinding('class.mdc-typography--headline') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-title]' | ||
}) | ||
export class MdcTitleDirective { | ||
@HostBinding('class.mdc-typography--title') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-subheading2]' | ||
}) | ||
export class MdcSubheading2Directive { | ||
@HostBinding('class.mdc-typography--subheading2') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-subheading1]' | ||
}) | ||
export class MdcSubheading1Directive { | ||
@HostBinding('class.mdc-typography--subheading1') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-body2]' | ||
}) | ||
export class MdcBody2Directive { | ||
@HostBinding('class.mdc-typography--body2') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-body1]' | ||
}) | ||
export class MdcBody1Directive { | ||
@HostBinding('class.mdc-typography--body1') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-caption]' | ||
}) | ||
export class MdcCaptionDirective { | ||
@HostBinding('class.mdc-typography--caption') isHostClass = true; | ||
} | ||
|
||
@Directive({ | ||
selector: '[mdc-typography-button]' | ||
}) | ||
export class MdcButtonDirective { | ||
@HostBinding('class.mdc-typography--button') isHostClass = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters