@@ -29,7 +29,7 @@ component by following these steps:
29
29
},
30
30
...
31
31
```
32
-
32
+
33
33
3 . Import the ` NgModule ` for the component you want to use. For example, the checkbox:
34
34
``` ts
35
35
import {MatCheckboxModule } from ' @angular/material-experimental/mdc-checkbox' ;
@@ -42,7 +42,7 @@ component by following these steps:
42
42
```
43
43
44
44
4 . Add use the components just as you would the normal Angular Material components. For example,
45
- the checkbox:
45
+ the checkbox:
46
46
``` html
47
47
<mat-checkbox [checked] =" isChecked" >Check me</mat-checkbox >
48
48
```
@@ -52,23 +52,23 @@ mixins except that they are suffixed with `-mdc`. Some experimental components m
52
52
be included in the pre-built CSS mixin and will need to be explicitly included.
53
53
54
54
``` scss
55
- @import ' ~@angular/material/theming ' ;
56
- @import ' ~@angular/material-experimental/mdc-theming/all-theme ' ;
57
-
58
- $my-primary : mat-palette ($ mat- indigo );
59
- $my-accent : mat-palette ($ mat- pink , A200 , A100 , A400 );
60
- $my-theme : mat-light-theme ((
55
+ @use ' ~@angular/material' as mat ;
56
+ @use ' ~@angular/material-experimental' as mat-experimental ;
57
+
58
+ $my-primary : mat . define -palette (mat . $ indigo-palette );
59
+ $my-accent : mat . define -palette (mat . $ pink-palette , A200 , A100 , A400 );
60
+ $my-theme : mat . define -light-theme ((
61
61
color : (
62
- primary: $my-primary ,
62
+ primary: $my-primary ,
63
63
accent: $my-accent
64
64
),
65
- // Using `mat -mdc-typography-config` rather than `mat -typography-config` generates a typography
66
- // config directly from the official Material Design styles. This includes using `rem`-based
67
- // measurements rather than `px`-based ones as the spec recommends.
68
- typography: mat-mdc-typography-config (),
65
+ // Using `define -mdc-typography-config` rather than `define -typography-config` generates a
66
+ // typography config directly from the official Material Design styles. This includes using
67
+ // `rem`-based measurements rather than `px`-based ones as the spec recommends.
68
+ typography: mat-experimental . define- mdc-typography-config (),
69
69
// The density level to use in this theme, defaults to 0 if not specified.
70
70
density: 0
71
71
));
72
72
73
- @include angular-material -mdc-theme ($my-theme );
73
+ @include mat-experimental . all -mdc-component-themes ($my-theme );
74
74
```
0 commit comments