File tree Expand file tree Collapse file tree 14 files changed +142
-3
lines changed
integration/mdc-migration Expand file tree Collapse file tree 14 files changed +142
-3
lines changed Original file line number Diff line number Diff line change 4
4
< chips-example > </ chips-example >
5
5
< form-field-example > </ form-field-example >
6
6
< input-example > </ input-example >
7
+ < list-example > </ list-example >
7
8
< menu-example > </ menu-example >
8
9
< paginator-example > </ paginator-example >
9
10
< progress-bar-example > </ progress-bar-example >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {MatChipsModule} from '@angular/material-experimental/mdc-chips';
11
11
import { MatFormFieldModule } from '@angular/material-experimental/mdc-form-field' ;
12
12
import { MatIconModule } from '@angular/material/icon' ;
13
13
import { MatInputModule } from '@angular/material-experimental/mdc-input' ;
14
+ import { MatListModule } from '@angular/material-experimental/mdc-list' ;
14
15
import { MatMenuModule } from '@angular/material-experimental/mdc-menu' ;
15
16
import { MatPaginatorModule } from '@angular/material-experimental/mdc-paginator' ;
16
17
import { MatProgressBarModule } from '@angular/material-experimental/mdc-progress-bar' ;
@@ -21,6 +22,7 @@ import {CardComponent} from './components/card/card.component';
21
22
import { ChipsComponent } from './components/chips/chips.component' ;
22
23
import { FormFieldComponent } from './components/form-field/form-field.component' ;
23
24
import { InputComponent } from './components/input/input.component' ;
25
+ import { ListComponent } from './components/list/list.component' ;
24
26
import { MenuComponent } from './components/menu/menu.component' ;
25
27
import { PaginatorComponent } from './components/paginator/paginator.component' ;
26
28
import { ProgressSpinnerComponent } from './components/progress-spinner/progress-spinner.component' ;
@@ -37,6 +39,7 @@ import {ButtonComponent} from './components/button/button.component';
37
39
ChipsComponent ,
38
40
FormFieldComponent ,
39
41
InputComponent ,
42
+ ListComponent ,
40
43
MenuComponent ,
41
44
PaginatorComponent ,
42
45
ProgressBarComponent ,
@@ -53,6 +56,7 @@ import {ButtonComponent} from './components/button/button.component';
53
56
MatFormFieldModule ,
54
57
MatIconModule ,
55
58
MatInputModule ,
59
+ MatListModule ,
56
60
MatMenuModule ,
57
61
MatPaginatorModule ,
58
62
MatProgressBarModule ,
Original file line number Diff line number Diff line change
1
+ < h2 > List example</ h2 >
2
+ < mat-list role ="list ">
3
+ < mat-list-item role ="listitem ">
4
+ < mat-icon mat-list-icon > account_circle</ mat-icon >
5
+ < div mat-line > Account Information</ div >
6
+ </ mat-list-item >
7
+ < mat-list-item role ="listitem ">
8
+ < mat-icon mat-list-icon > settings</ mat-icon >
9
+ < div mat-line > Settings</ div >
10
+ </ mat-list-item >
11
+ < mat-list-item role ="listitem ">
12
+ < mat-icon mat-list-icon > logout</ mat-icon >
13
+ < div mat-line > Log Out</ div >
14
+ </ mat-list-item >
15
+ </ mat-list >
Original file line number Diff line number Diff line change
1
+ .mat-mdc-list { padding : 8px ; }
2
+
3
+ .mat-mdc-list-item-icon {
4
+ color : darkblue ;
5
+ }
6
+
7
+ /* TODO: The following rule targets internal classes of list that may no longer apply for the MDC version. */
8
+
9
+ .mat-list-item-content {
10
+ padding : 8px ;
11
+ }
Original file line number Diff line number Diff line change
1
+ import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ;
3
+ import { MatListModule } from '@angular/material/list' ;
4
+ import { ListComponent } from './list.component' ;
5
+
6
+ describe ( 'ListComponent' , ( ) => {
7
+ let component : ListComponent ;
8
+ let fixture : ComponentFixture < ListComponent > ;
9
+
10
+ beforeEach ( async ( ) => {
11
+ await TestBed . configureTestingModule ( {
12
+ imports : [ BrowserAnimationsModule , MatListModule ] ,
13
+ declarations : [ ListComponent ] ,
14
+ } ) . compileComponents ( ) ;
15
+ } ) ;
16
+
17
+ beforeEach ( ( ) => {
18
+ fixture = TestBed . createComponent ( ListComponent ) ;
19
+ component = fixture . componentInstance ;
20
+ fixture . detectChanges ( ) ;
21
+ } ) ;
22
+
23
+ it ( 'should create' , ( ) => {
24
+ expect ( component ) . toBeTruthy ( ) ;
25
+ } ) ;
26
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { Component , OnInit } from '@angular/core' ;
2
+
3
+ @Component ( {
4
+ selector : 'list-example' ,
5
+ templateUrl : './list.component.html' ,
6
+ styleUrls : [ './list.component.scss' ] ,
7
+ } )
8
+ export class ListComponent implements OnInit {
9
+ constructor ( ) { }
10
+
11
+ ngOnInit ( ) : void { }
12
+ }
Original file line number Diff line number Diff line change @@ -42,10 +42,12 @@ $sample-project-theme: mat.define-light-theme((
42
42
@include mat .mdc-chips-typography ($sample-project-theme );
43
43
@include mat .mdc-form-field-theme ($sample-project-theme );
44
44
@include mat .mdc-form-field-typography ($sample-project-theme );
45
- @include mat .mdc-menu-theme ($sample-project-theme );
46
- @include mat .mdc-menu-typography ($sample-project-theme );
47
45
@include mat .mdc-input-theme ($sample-project-theme );
48
46
@include mat .mdc-input-typography ($sample-project-theme );
47
+ @include mat .mdc-list-theme ($sample-project-theme );
48
+ @include mat .mdc-list-typography ($sample-project-theme );
49
+ @include mat .mdc-menu-theme ($sample-project-theme );
50
+ @include mat .mdc-menu-typography ($sample-project-theme );
49
51
@include mat .mdc-paginator-theme ($sample-project-theme );
50
52
@include mat .mdc-paginator-typography ($sample-project-theme );
51
53
@include mat .mdc-progress-bar-theme ($sample-project-theme );
Original file line number Diff line number Diff line change 4
4
< chips-example > </ chips-example >
5
5
< form-field-example > </ form-field-example >
6
6
< input-example > </ input-example >
7
+ < list-example > </ list-example >
7
8
< menu-example > </ menu-example >
8
9
< paginator-example > </ paginator-example >
9
10
< progress-bar-example > </ progress-bar-example >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {MatChipsModule} from '@angular/material/chips';
11
11
import { MatFormFieldModule } from '@angular/material/form-field' ;
12
12
import { MatIconModule } from '@angular/material/icon' ;
13
13
import { MatInputModule } from '@angular/material/input' ;
14
+ import { MatListModule } from '@angular/material/list' ;
14
15
import { MatMenuModule } from '@angular/material/menu' ;
15
16
import { MatPaginatorModule } from '@angular/material/paginator' ;
16
17
import { MatProgressBarModule } from '@angular/material/progress-bar' ;
@@ -21,6 +22,7 @@ import {CardComponent} from './components/card/card.component';
21
22
import { ChipsComponent } from './components/chips/chips.component' ;
22
23
import { FormFieldComponent } from './components/form-field/form-field.component' ;
23
24
import { InputComponent } from './components/input/input.component' ;
25
+ import { ListComponent } from './components/list/list.component' ;
24
26
import { MenuComponent } from './components/menu/menu.component' ;
25
27
import { PaginatorComponent } from './components/paginator/paginator.component' ;
26
28
import { ProgressSpinnerComponent } from './components/progress-spinner/progress-spinner.component' ;
@@ -37,6 +39,7 @@ import {ButtonComponent} from './components/button/button.component';
37
39
ChipsComponent ,
38
40
FormFieldComponent ,
39
41
InputComponent ,
42
+ ListComponent ,
40
43
MenuComponent ,
41
44
PaginatorComponent ,
42
45
ProgressBarComponent ,
@@ -53,6 +56,7 @@ import {ButtonComponent} from './components/button/button.component';
53
56
MatFormFieldModule ,
54
57
MatIconModule ,
55
58
MatInputModule ,
59
+ MatListModule ,
56
60
MatMenuModule ,
57
61
MatPaginatorModule ,
58
62
MatProgressBarModule ,
Original file line number Diff line number Diff line change
1
+ < h2 > List example</ h2 >
2
+ < mat-list role ="list ">
3
+ < mat-list-item role ="listitem ">
4
+ < mat-icon mat-list-icon > account_circle</ mat-icon >
5
+ < div mat-line > Account Information</ div >
6
+ </ mat-list-item >
7
+ < mat-list-item role ="listitem ">
8
+ < mat-icon mat-list-icon > settings</ mat-icon >
9
+ < div mat-line > Settings</ div >
10
+ </ mat-list-item >
11
+ < mat-list-item role ="listitem ">
12
+ < mat-icon mat-list-icon > logout</ mat-icon >
13
+ < div mat-line > Log Out</ div >
14
+ </ mat-list-item >
15
+ </ mat-list >
You can’t perform that action at this time.
0 commit comments