@@ -3,7 +3,7 @@ This is a prototype of an alternate version of `MatButton` built on top of
3
3
experimental and should not be used in production.
4
4
5
5
## How to use
6
- Assuming your application is already up and running using Angular Material, you can add this
6
+ Assuming your application is already up and running using Angular Material, you can add this
7
7
component by following these steps:
8
8
9
9
1 . Install ` @angular/material-experimental ` and MDC Web:
@@ -41,41 +41,40 @@ component by following these steps:
41
41
```
42
42
43
43
4 . Use the buttons in your component's template:
44
-
45
- ``` html
44
+
45
+ ``` html
46
46
<button mat-button > Basic </button >
47
47
<button mat-raised-button > Raised </button >
48
48
<button mat-stroked-button > Stroked </button >
49
- <button mat-flat-button > Flat </button >
49
+ <button mat-flat-button > Flat </button >
50
50
<button mat-icon-button >
51
51
<mat-icon >save</mat-icon >
52
52
</button >
53
53
<button mat-fab >
54
54
<mat-icon >add</mat-icon >
55
55
</button >
56
- ```
57
-
58
- 5 . Add the theme and typography mixins to your Sass. Note that there are three separate mixins for
59
- the button variants: standard buttons, icon buttons, and floating action buttons. Include only the mixins of the
56
+ ```
57
+
58
+ 5 . Add the theme and typography mixins to your Sass. Note that there are three separate mixins for
59
+ the button variants: standard buttons, icon buttons, and floating action buttons. Include only the mixins of the
60
60
button variants you are using:
61
61
62
62
``` scss
63
- @import ' ~@angular/material/theming ' ;
64
- @import ' ~@angular/material-experimental/mdc-button/button-theme ' ;
63
+ @use ' ~@angular/material' as mat ;
64
+ @use ' ~@angular/material-experimental' as mat-experimental ;
65
65
66
- $candy-app-primary : mat-palette ($ mat- indigo );
67
- $candy-app-accent : mat-palette ($ mat- pink , A200 , A100 , A400 );
68
- $candy-app-theme : mat-light-theme ((
66
+ $candy-app-primary : mat . define -palette (mat . $ indigo-palette );
67
+ $candy-app-accent : mat . define -palette (mat . $ pink-palette , A200 , A100 , A400 );
68
+ $candy-app-theme : mat . define -light-theme ((
69
69
color : (
70
70
primary: $candy-app-primary ,
71
71
accent: $candy-app-accent ,
72
72
)
73
73
));
74
74
75
-
76
- @include mat-mdc-button-theme ($candy-app-theme );
77
- @include mat-mdc-fab-theme ($candy-app-theme );
78
- @include mat-mdc-icon-button-theme ($candy-app-theme );
75
+ @include mat-experimental .mdc-button-theme ($candy-app-theme );
76
+ @include mat-experimental .mdc-fab-theme ($candy-app-theme );
77
+ @include mat-experimental .mdc-icon-button-theme ($candy-app-theme );
79
78
```
80
79
81
80
## API differences
0 commit comments