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 44< chips-example > </ chips-example >
55< form-field-example > </ form-field-example >
66< input-example > </ input-example >
7+ < list-example > </ list-example >
78< menu-example > </ menu-example >
89< paginator-example > </ paginator-example >
910< 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';
1111import { MatFormFieldModule } from '@angular/material-experimental/mdc-form-field' ;
1212import { MatIconModule } from '@angular/material/icon' ;
1313import { MatInputModule } from '@angular/material-experimental/mdc-input' ;
14+ import { MatListModule } from '@angular/material-experimental/mdc-list' ;
1415import { MatMenuModule } from '@angular/material-experimental/mdc-menu' ;
1516import { MatPaginatorModule } from '@angular/material-experimental/mdc-paginator' ;
1617import { MatProgressBarModule } from '@angular/material-experimental/mdc-progress-bar' ;
@@ -21,6 +22,7 @@ import {CardComponent} from './components/card/card.component';
2122import { ChipsComponent } from './components/chips/chips.component' ;
2223import { FormFieldComponent } from './components/form-field/form-field.component' ;
2324import { InputComponent } from './components/input/input.component' ;
25+ import { ListComponent } from './components/list/list.component' ;
2426import { MenuComponent } from './components/menu/menu.component' ;
2527import { PaginatorComponent } from './components/paginator/paginator.component' ;
2628import { ProgressSpinnerComponent } from './components/progress-spinner/progress-spinner.component' ;
@@ -37,6 +39,7 @@ import {ButtonComponent} from './components/button/button.component';
3739 ChipsComponent ,
3840 FormFieldComponent ,
3941 InputComponent ,
42+ ListComponent ,
4043 MenuComponent ,
4144 PaginatorComponent ,
4245 ProgressBarComponent ,
@@ -53,6 +56,7 @@ import {ButtonComponent} from './components/button/button.component';
5356 MatFormFieldModule ,
5457 MatIconModule ,
5558 MatInputModule ,
59+ MatListModule ,
5660 MatMenuModule ,
5761 MatPaginatorModule ,
5862 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((
4242@include mat .mdc-chips-typography ($sample-project-theme );
4343@include mat .mdc-form-field-theme ($sample-project-theme );
4444@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 );
4745@include mat .mdc-input-theme ($sample-project-theme );
4846@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 );
4951@include mat .mdc-paginator-theme ($sample-project-theme );
5052@include mat .mdc-paginator-typography ($sample-project-theme );
5153@include mat .mdc-progress-bar-theme ($sample-project-theme );
Original file line number Diff line number Diff line change 44< chips-example > </ chips-example >
55< form-field-example > </ form-field-example >
66< input-example > </ input-example >
7+ < list-example > </ list-example >
78< menu-example > </ menu-example >
89< paginator-example > </ paginator-example >
910< 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';
1111import { MatFormFieldModule } from '@angular/material/form-field' ;
1212import { MatIconModule } from '@angular/material/icon' ;
1313import { MatInputModule } from '@angular/material/input' ;
14+ import { MatListModule } from '@angular/material/list' ;
1415import { MatMenuModule } from '@angular/material/menu' ;
1516import { MatPaginatorModule } from '@angular/material/paginator' ;
1617import { MatProgressBarModule } from '@angular/material/progress-bar' ;
@@ -21,6 +22,7 @@ import {CardComponent} from './components/card/card.component';
2122import { ChipsComponent } from './components/chips/chips.component' ;
2223import { FormFieldComponent } from './components/form-field/form-field.component' ;
2324import { InputComponent } from './components/input/input.component' ;
25+ import { ListComponent } from './components/list/list.component' ;
2426import { MenuComponent } from './components/menu/menu.component' ;
2527import { PaginatorComponent } from './components/paginator/paginator.component' ;
2628import { ProgressSpinnerComponent } from './components/progress-spinner/progress-spinner.component' ;
@@ -37,6 +39,7 @@ import {ButtonComponent} from './components/button/button.component';
3739 ChipsComponent ,
3840 FormFieldComponent ,
3941 InputComponent ,
42+ ListComponent ,
4043 MenuComponent ,
4144 PaginatorComponent ,
4245 ProgressBarComponent ,
@@ -53,6 +56,7 @@ import {ButtonComponent} from './components/button/button.component';
5356 MatFormFieldModule ,
5457 MatIconModule ,
5558 MatInputModule ,
59+ MatListModule ,
5660 MatMenuModule ,
5761 MatPaginatorModule ,
5862 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