mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(divider): move divider out of mat-list (#5862)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
/src/lib/chips/** @tinayuangao
|
||||
/src/lib/datepicker/** @mmalerba
|
||||
/src/lib/dialog/** @jelbourn @crisbeto
|
||||
/src/lib/divider/** @jelbourn @crisbeto
|
||||
/src/lib/expansion/** @josephperrott @jelbourn
|
||||
/src/lib/form-field/** @mmalerba
|
||||
/src/lib/grid-list/** @kara @jelbourn
|
||||
|
||||
@@ -27,6 +27,23 @@
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
|
||||
<mat-card>
|
||||
<mat-card-subtitle>Subtitle</mat-card-subtitle>
|
||||
<mat-card-title>Card with title, footer, and inset-divider</mat-card-title>
|
||||
<mat-card-content>
|
||||
<p>This is supporting text.</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
</mat-card-content>
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
<mat-card-actions>
|
||||
<button mat-button>LIKE</button>
|
||||
<button mat-button>SHARE</button>
|
||||
</mat-card-actions>
|
||||
<mat-card-footer>
|
||||
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
|
||||
<mat-card>
|
||||
<img mat-card-image src="https://material.angularjs.org/latest/img/washedout.png">
|
||||
<mat-card-title>Content Title</mat-card-title>
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
MatChipsModule,
|
||||
MatDatepickerModule,
|
||||
MatDialogModule,
|
||||
MatDividerModule,
|
||||
MatExpansionModule,
|
||||
MatFormFieldModule,
|
||||
MatGridListModule,
|
||||
@@ -63,6 +64,7 @@ import {PortalModule} from '@angular/cdk/portal';
|
||||
MatTableModule,
|
||||
MatDatepickerModule,
|
||||
MatDialogModule,
|
||||
MatDividerModule,
|
||||
MatExpansionModule,
|
||||
MatFormFieldModule,
|
||||
MatGridListModule,
|
||||
|
||||
@@ -24,13 +24,14 @@
|
||||
|
||||
<mat-list>
|
||||
<h3 mat-subheader>Today</h3>
|
||||
<mat-list-item *ngFor="let message of messages">
|
||||
<mat-list-item *ngFor="let message of messages; last as last">
|
||||
<img mat-list-avatar [src]="message.image" alt="Image of {{message.from}}">
|
||||
<h4 mat-line>{{message.from}}</h4>
|
||||
<p mat-line>
|
||||
<span>{{message.subject}} -- </span>
|
||||
<span class="demo-secondary-text">{{message.message}}</span>
|
||||
</p>
|
||||
<mat-divider [inset]="true" *ngIf="!last"></mat-divider>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-list-item *ngFor="let message of messages">
|
||||
|
||||
@@ -14,6 +14,24 @@
|
||||
</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
<div class="menu-section">
|
||||
<p>Menu with divider</p>
|
||||
|
||||
<mat-toolbar>
|
||||
<button mat-icon-button [matMenuTriggerFor]="divider" aria-label="Open basic menu">
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
</button>
|
||||
</mat-toolbar>
|
||||
|
||||
<mat-menu #divider="matMenu">
|
||||
<ng-container *ngFor="let item of items; last as last">
|
||||
<button mat-menu-item [disabled]="item.disabled">
|
||||
{{ item.text }}
|
||||
</button>
|
||||
<mat-divider *ngIf="!last"></mat-divider>
|
||||
</ng-container>
|
||||
</mat-menu>
|
||||
</div>
|
||||
<div class="menu-section">
|
||||
<p>Nested menu</p>
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ System.config({
|
||||
'@angular/material/core': 'dist/packages/material/core/index.js',
|
||||
'@angular/material/datepicker': 'dist/packages/material/datepicker/index.js',
|
||||
'@angular/material/dialog': 'dist/packages/material/dialog/index.js',
|
||||
'@angular/material/divider': 'dist/packages/material/divider/index.js',
|
||||
'@angular/material/expansion': 'dist/packages/material/expansion/index.js',
|
||||
'@angular/material/form-field': 'dist/packages/material/form-field/index.js',
|
||||
'@angular/material/grid-list': 'dist/packages/material/grid-list/index.js',
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
MatButtonModule,
|
||||
MatCheckboxModule,
|
||||
MatDialogModule,
|
||||
MatDividerModule,
|
||||
MatFormFieldModule,
|
||||
MatGridListModule,
|
||||
MatIconModule,
|
||||
@@ -50,6 +51,7 @@ import {ReactiveFormsModule} from '@angular/forms';
|
||||
MatButtonModule,
|
||||
MatCheckboxModule,
|
||||
MatDialogModule,
|
||||
MatDividerModule,
|
||||
MatFormFieldModule,
|
||||
MatGridListModule,
|
||||
MatIconModule,
|
||||
|
||||
@@ -59,6 +59,7 @@ System.config({
|
||||
'@angular/material/core': 'dist/bundles/material-core.umd.js',
|
||||
'@angular/material/datepicker': 'dist/bundles/material-datepicker.umd.js',
|
||||
'@angular/material/dialog': 'dist/bundles/material-dialog.umd.js',
|
||||
'@angular/material/divider': 'dist/bundles/material-divider.umd.js',
|
||||
'@angular/material/expansion': 'dist/bundles/material-expansion.umd.js',
|
||||
'@angular/material/form-field': 'dist/bundles/material-form-field.umd.js',
|
||||
'@angular/material/grid-list': 'dist/bundles/material-grid-list.umd.js',
|
||||
|
||||
@@ -16,6 +16,22 @@ $mat-card-header-size: 40px !default;
|
||||
padding: $mat-card-default-padding;
|
||||
border-radius: $mat-card-border-radius;
|
||||
|
||||
.mat-divider {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
[dir='rtl'] & {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&.mat-divider-inset {
|
||||
position: static;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include cdk-high-contrast {
|
||||
outline: solid 1px;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
@import '../../table/table-theme';
|
||||
@import '../../datepicker/datepicker-theme';
|
||||
@import '../../dialog/dialog-theme';
|
||||
@import '../../divider/divider-theme';
|
||||
@import '../../expansion/expansion-theme';
|
||||
@import '../../grid-list/grid-list-theme';
|
||||
@import '../../icon/icon-theme';
|
||||
@@ -43,6 +44,7 @@
|
||||
@include mat-table-theme($theme);
|
||||
@include mat-datepicker-theme($theme);
|
||||
@include mat-dialog-theme($theme);
|
||||
@include mat-divider-theme($theme);
|
||||
@include mat-expansion-panel-theme($theme);
|
||||
@include mat-form-field-theme($theme);
|
||||
@include mat-grid-list-theme($theme);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Please see the official documentation at https://material.angular.io/components/component/divider
|
||||
@@ -0,0 +1,15 @@
|
||||
@import '../core/theming/palette';
|
||||
@import '../core/theming/theming';
|
||||
|
||||
|
||||
@mixin mat-divider-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
||||
.mat-divider {
|
||||
border-top-color: mat-color($foreground, divider);
|
||||
}
|
||||
|
||||
.mat-divider-vertical {
|
||||
border-right-color: mat-color($foreground, divider);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {MatCommonModule} from '@angular/material/core';
|
||||
import {MatDivider} from './divider';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [MatCommonModule, CommonModule],
|
||||
exports: [
|
||||
MatDivider,
|
||||
MatCommonModule,
|
||||
],
|
||||
declarations: [
|
||||
MatDivider,
|
||||
],
|
||||
})
|
||||
export class MatDividerModule {}
|
||||
@@ -0,0 +1,55 @@
|
||||
`<mat-divider>` is a component that allows for Material styling of a line separator with various orientation options.
|
||||
|
||||
<!-- example(divider-overview) -->
|
||||
|
||||
|
||||
### Simple divider
|
||||
|
||||
A `<mat-divider>` element can be used on its own to create a horizontal or vertical line styled with a Material theme
|
||||
|
||||
```html
|
||||
<mat-divider></mat-divider>
|
||||
```
|
||||
|
||||
### Inset divider
|
||||
|
||||
Add the `inset` attribute in order to set whether or not the divider is an inset divider.
|
||||
|
||||
```html
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
```
|
||||
|
||||
### Vertical divider
|
||||
|
||||
Add the `vertical` attribute in order to set whether or not the divider is vertically-oriented.
|
||||
|
||||
```html
|
||||
<mat-divider [vertical]="true"></mat-divider>
|
||||
```
|
||||
|
||||
|
||||
### Lists with inset dividers
|
||||
|
||||
Dividers can be added to lists as a means of separating content into distinct sections.
|
||||
Inset dividers can also be added to provide the appearance of distinct elements in a list without cluttering content
|
||||
like avatar images or icons. Make sure to avoid adding an inset divider to the last element
|
||||
in a list, because it will overlap with the section divider.
|
||||
|
||||
```html
|
||||
<mat-list>
|
||||
<h3 mat-subheader>Folders</h3>
|
||||
<mat-list-item *ngFor="let folder of folders; last as last">
|
||||
<mat-icon mat-list-icon>folder</mat-icon>
|
||||
<h4 mat-line>{{folder.name}}</h4>
|
||||
<p mat-line class="demo-2"> {{folder.updated}} </p>
|
||||
<mat-divider [inset]="true" *ngIf="!last"></mat-divider>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
<h3 md-subheader>Notes</h3>
|
||||
<mat-list-item *ngFor="let note of notes">
|
||||
<mat-icon md-list-icon>note</mat-icon>
|
||||
<h4 md-line>{{note.name}}</h4>
|
||||
<p md-line class="demo-2"> {{note.updated}} </p>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
```
|
||||
@@ -0,0 +1,23 @@
|
||||
$mat-divider-width: 1px;
|
||||
$mat-divider-inset-margin: 80px;
|
||||
|
||||
.mat-divider {
|
||||
display: block;
|
||||
margin: 0;
|
||||
border-top-width: $mat-divider-width;
|
||||
border-top-style: solid;
|
||||
|
||||
&.mat-divider-vertical {
|
||||
border-top: 0;
|
||||
border-right-width: $mat-divider-width;
|
||||
border-right-style: solid;
|
||||
}
|
||||
|
||||
&.mat-divider-inset {
|
||||
margin-left: $mat-divider-inset-margin;
|
||||
[dir='rtl'] & {
|
||||
margin-left: auto;
|
||||
margin-right: $mat-divider-inset-margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
import {Component} from '@angular/core';
|
||||
import {By} from '@angular/platform-browser';
|
||||
import {MatDividerModule} from './divider-module';
|
||||
|
||||
|
||||
describe('MatDivider', () => {
|
||||
|
||||
let fixture: ComponentFixture<MatDividerTestComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [MatDividerModule],
|
||||
declarations: [
|
||||
MatDividerTestComponent
|
||||
],
|
||||
});
|
||||
|
||||
TestBed.compileComponents();
|
||||
fixture = TestBed.createComponent(MatDividerTestComponent);
|
||||
}));
|
||||
|
||||
it('should apply vertical class to vertical divider', () => {
|
||||
fixture.componentInstance.vertical = true;
|
||||
fixture.detectChanges();
|
||||
|
||||
const divider = fixture.debugElement.query(By.css('mat-divider'));
|
||||
expect(divider.nativeElement.className).toContain('mat-divider');
|
||||
expect(divider.nativeElement.className).toContain('mat-divider-vertical');
|
||||
});
|
||||
|
||||
it('should apply inset class to inset divider', () => {
|
||||
fixture.componentInstance.inset = true;
|
||||
fixture.detectChanges();
|
||||
|
||||
const divider = fixture.debugElement.query(By.css('mat-divider'));
|
||||
expect(divider.nativeElement.className).toContain('mat-divider');
|
||||
expect(divider.nativeElement.className).toContain('mat-divider-inset');
|
||||
});
|
||||
|
||||
it('should apply inset and vertical classes to vertical inset divider', () => {
|
||||
fixture.componentInstance.vertical = true;
|
||||
fixture.componentInstance.inset = true;
|
||||
fixture.detectChanges();
|
||||
|
||||
const divider = fixture.debugElement.query(By.css('mat-divider'));
|
||||
expect(divider.nativeElement.className).toContain('mat-divider');
|
||||
expect(divider.nativeElement.className).toContain('mat-divider-inset');
|
||||
expect(divider.nativeElement.className).toContain('mat-divider-vertical');
|
||||
});
|
||||
|
||||
it('should add aria roles properly', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const divider = fixture.debugElement.query(By.css('mat-divider'));
|
||||
expect(divider.nativeElement.getAttribute('role')).toBe('separator');
|
||||
});
|
||||
});
|
||||
|
||||
@Component({
|
||||
template: `<mat-divider [vertical]="vertical" [inset]="inset"></mat-divider>`
|
||||
})
|
||||
class MatDividerTestComponent {
|
||||
vertical: boolean;
|
||||
inset: boolean;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core';
|
||||
import {coerceBooleanProperty} from '@angular/cdk/coercion';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'mat-divider',
|
||||
host: {
|
||||
'role': 'separator',
|
||||
'[attr.aria-orientation]': 'vertical ? "vertical" : "horizontal"',
|
||||
'[class.mat-divider-vertical]': 'vertical',
|
||||
'[class.mat-divider-inset]': 'inset',
|
||||
'class': 'mat-divider'
|
||||
},
|
||||
template: '',
|
||||
styleUrls: ['divider.css'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
preserveWhitespaces: false,
|
||||
})
|
||||
export class MatDivider {
|
||||
/** Whether the divider is vertically aligned. */
|
||||
@Input() get vertical(): boolean { return this._vertical; }
|
||||
set vertical(value: boolean) { this._vertical = coerceBooleanProperty(value); }
|
||||
private _vertical: boolean = false;
|
||||
|
||||
/** Whether the divider is an inset divider. */
|
||||
@Input() get inset(): boolean { return this._inset; }
|
||||
set inset(value: boolean) { this._inset = coerceBooleanProperty(value); }
|
||||
private _inset: boolean = false;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
export * from './public-api';
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
export * from './divider';
|
||||
export * from './divider-module';
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../tsconfig-build",
|
||||
"files": [
|
||||
"public-api.ts",
|
||||
"../typings.d.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": true,
|
||||
"flatModuleOutFile": "index.js",
|
||||
"flatModuleId": "@angular/material/divider",
|
||||
"skipTemplateCodegen": true
|
||||
}
|
||||
}
|
||||
@@ -26,10 +26,6 @@
|
||||
background-color: mat-color($background, disabled-list-option);
|
||||
}
|
||||
|
||||
.mat-divider {
|
||||
border-top-color: mat-color($foreground, divider);
|
||||
}
|
||||
|
||||
.mat-nav-list .mat-list-item {
|
||||
outline: none;
|
||||
|
||||
|
||||
@@ -15,16 +15,15 @@ import {
|
||||
MatRippleModule,
|
||||
} from '@angular/material/core';
|
||||
import {
|
||||
MatDividerCssMatStyler,
|
||||
MatList,
|
||||
MatNavList,
|
||||
MatListAvatarCssMatStyler,
|
||||
MatListDivider,
|
||||
MatListIconCssMatStyler,
|
||||
MatListItem,
|
||||
MatListSubheaderCssMatStyler,
|
||||
} from './list';
|
||||
import {MatListOption, MatSelectionList} from './selection-list';
|
||||
import {MatDividerModule} from '@angular/material/divider';
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -33,25 +32,22 @@ import {MatListOption, MatSelectionList} from './selection-list';
|
||||
MatList,
|
||||
MatNavList,
|
||||
MatListItem,
|
||||
MatListDivider,
|
||||
MatListAvatarCssMatStyler,
|
||||
MatLineModule,
|
||||
MatCommonModule,
|
||||
MatListIconCssMatStyler,
|
||||
MatDividerCssMatStyler,
|
||||
MatListSubheaderCssMatStyler,
|
||||
MatPseudoCheckboxModule,
|
||||
MatSelectionList,
|
||||
MatListOption
|
||||
MatListOption,
|
||||
MatDividerModule
|
||||
],
|
||||
declarations: [
|
||||
MatList,
|
||||
MatNavList,
|
||||
MatListItem,
|
||||
MatListDivider,
|
||||
MatListAvatarCssMatStyler,
|
||||
MatListIconCssMatStyler,
|
||||
MatDividerCssMatStyler,
|
||||
MatListSubheaderCssMatStyler,
|
||||
MatSelectionList,
|
||||
MatListOption
|
||||
|
||||
+25
-6
@@ -27,6 +27,8 @@ $mat-dense-three-line-height: 76px;
|
||||
$mat-dense-multi-line-padding: 16px;
|
||||
$mat-dense-list-icon-size: 20px;
|
||||
|
||||
$mat-list-item-inset-divider-offset: 72px;
|
||||
|
||||
// This mixin provides all list-item styles, changing font size and height
|
||||
// based on whether the list is in dense mode.
|
||||
@mixin mat-list-item-base($base-height, $avatar-height, $two-line-height,
|
||||
@@ -116,6 +118,29 @@ $mat-dense-list-icon-size: 20px;
|
||||
border-radius: 50%;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.mat-divider {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
[dir='rtl'] & {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&.mat-divider-inset {
|
||||
left: $mat-list-item-inset-divider-offset;
|
||||
width: calc(100% - #{$mat-list-item-inset-divider-offset});
|
||||
margin: 0;
|
||||
|
||||
[dir='rtl'] & {
|
||||
left: auto;
|
||||
right: $mat-list-item-inset-divider-offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mat-subheader {
|
||||
@@ -185,12 +210,6 @@ $mat-dense-list-icon-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-divider {
|
||||
display: block;
|
||||
border-top-style: solid;
|
||||
border-top-width: 1px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mat-nav-list {
|
||||
a {
|
||||
|
||||
@@ -30,18 +30,6 @@ export const _MatListMixinBase = mixinDisableRipple(MatListBase);
|
||||
export class MatListItemBase {}
|
||||
export const _MatListItemMixinBase = mixinDisableRipple(MatListItemBase);
|
||||
|
||||
|
||||
/** Divider between items within a list. */
|
||||
@Directive({
|
||||
selector: 'mat-divider',
|
||||
host: {
|
||||
'role': 'separator',
|
||||
'aria-orientation': 'horizontal'
|
||||
}
|
||||
})
|
||||
export class MatListDivider {}
|
||||
|
||||
/** A Material Design list component. */
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'mat-nav-list',
|
||||
@@ -73,16 +61,6 @@ export class MatNavList extends _MatListMixinBase implements CanDisableRipple {}
|
||||
})
|
||||
export class MatList extends _MatListMixinBase implements CanDisableRipple {}
|
||||
|
||||
/**
|
||||
* Directive whose purpose is to add the mat- CSS styling to this selector.
|
||||
* @docs-private
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'mat-divider',
|
||||
host: {'class': 'mat-divider'}
|
||||
})
|
||||
export class MatDividerCssMatStyler {}
|
||||
|
||||
/**
|
||||
* Directive whose purpose is to add the mat- CSS styling to this selector.
|
||||
* @docs-private
|
||||
|
||||
@@ -16,6 +16,7 @@ export * from '@angular/material/chips';
|
||||
export * from '@angular/material/core';
|
||||
export * from '@angular/material/datepicker';
|
||||
export * from '@angular/material/dialog';
|
||||
export * from '@angular/material/divider';
|
||||
export * from '@angular/material/expansion';
|
||||
export * from '@angular/material/form-field';
|
||||
export * from '@angular/material/grid-list';
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/** No CSS for this example */
|
||||
@@ -0,0 +1,7 @@
|
||||
<mat-list>
|
||||
<mat-list-item>Item 1</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-list-item>Item 2</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-list-item>Item 3</mat-list-item>
|
||||
</mat-list>
|
||||
@@ -0,0 +1,10 @@
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @title Basic divider
|
||||
*/
|
||||
@Component({
|
||||
selector: 'divider-overview-example',
|
||||
templateUrl: 'divider-overview-example.html',
|
||||
})
|
||||
export class DividerOverviewExample {}
|
||||
@@ -127,6 +127,7 @@ import {ToolbarMultirowExample} from './toolbar-multirow/toolbar-multirow-exampl
|
||||
import {ToolbarOverviewExample} from './toolbar-overview/toolbar-overview-example';
|
||||
import {TooltipOverviewExample} from './tooltip-overview/tooltip-overview-example';
|
||||
import {TooltipPositionExample} from './tooltip-position/tooltip-position-example';
|
||||
import {DividerOverviewExample} from './divider-overview/divider-overview-example';
|
||||
|
||||
export const EXAMPLE_COMPONENTS = {
|
||||
'autocomplete-display': {
|
||||
@@ -321,6 +322,12 @@ export const EXAMPLE_COMPONENTS = {
|
||||
additionalFiles: ["dialog-overview-example-dialog.html"],
|
||||
selectorName: 'DialogOverviewExample, DialogOverviewExampleDialog'
|
||||
},
|
||||
'divider-overview': {
|
||||
title: 'Divider Overview',
|
||||
component: DividerOverviewExample,
|
||||
additionalFiles: null,
|
||||
selectorName: null
|
||||
},
|
||||
'elevation-overview': {
|
||||
title: 'Elevation CSS classes',
|
||||
component: ElevationOverviewExample,
|
||||
@@ -848,6 +855,7 @@ export const EXAMPLE_LIST = [
|
||||
DialogDataExampleDialog,DialogDataExample,
|
||||
DialogElementsExampleDialog,DialogElementsExample,
|
||||
DialogOverviewExampleDialog,DialogOverviewExample,
|
||||
DividerOverviewExample,
|
||||
ElevationOverviewExample,
|
||||
ExpansionOverviewExample,
|
||||
ExpansionStepsExample,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {CdkTableModule} from '@angular/cdk/table';
|
||||
import {
|
||||
MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule,
|
||||
MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule,
|
||||
MatDialogModule, MatGridListModule, MatIconModule, MatInputModule,
|
||||
MatDialogModule, MatDividerModule, MatGridListModule, MatIconModule, MatInputModule,
|
||||
MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule,
|
||||
MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule,
|
||||
MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule,
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
MatChipsModule,
|
||||
MatDatepickerModule,
|
||||
MatDialogModule,
|
||||
MatDividerModule,
|
||||
MatExpansionModule,
|
||||
MatFormFieldModule,
|
||||
MatGridListModule,
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
MatCheckboxModule,
|
||||
MatChipsModule,
|
||||
MatDatepickerModule,
|
||||
MatDividerModule,
|
||||
MatDialogModule,
|
||||
MatExpansionModule,
|
||||
MatFormFieldModule,
|
||||
@@ -78,6 +79,7 @@ export class KitchenSink {
|
||||
MatChipsModule,
|
||||
MatDatepickerModule,
|
||||
MatDialogModule,
|
||||
MatDividerModule,
|
||||
MatFormFieldModule,
|
||||
MatGridListModule,
|
||||
MatIconModule,
|
||||
|
||||
@@ -79,6 +79,7 @@ System.config({
|
||||
'@angular/material/core': 'dist/packages/material/core/index.js',
|
||||
'@angular/material/datepicker': 'dist/packages/material/datepicker/index.js',
|
||||
'@angular/material/dialog': 'dist/packages/material/dialog/index.js',
|
||||
'@angular/material/divider': 'dist/packages/material/divider/index.js',
|
||||
'@angular/material/expansion': 'dist/packages/material/expansion/index.js',
|
||||
'@angular/material/form-field': 'dist/packages/material/form-field/index.js',
|
||||
'@angular/material/grid-list': 'dist/packages/material/grid-list/index.js',
|
||||
|
||||
Reference in New Issue
Block a user