Skip to content

Commit 438d151

Browse files
AlirezaEbrahimkhaniandrewseguin
authored andcommitted
docs(material/chips): add chips avatar sample (#24449)
* docs(material/chips): add chips avatar sample resolves #22905 * docs(material/chips): the ending > tag markers and add description Change the ending > tag markers to be on the same line as their opening and add more description about chips avatar example * docs(material/chips): change image alt change image alts from "shiba1 image" to "Photo of a Shiba Inu" (cherry picked from commit 29b0a61)
1 parent 4198f5b commit 438d151

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

src/components-examples/material/chips/chips-avatar/chips-avatar-example.css

Whitespace-only changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<mat-chip-list aria-label="Dog selection">
2+
<mat-chip>
3+
<mat-chip-avatar>
4+
<img src="https://material.angular.io/assets/img/examples/shiba1.jpg" alt="Photo of a Shiba Inu"/>
5+
</mat-chip-avatar>
6+
Dog one
7+
</mat-chip>
8+
<mat-chip color="primary">
9+
<mat-chip-avatar>
10+
<img src="https://material.angular.io/assets/img/examples/shiba1.jpg" alt="Photo of a Shiba Inu"/>
11+
</mat-chip-avatar>
12+
Dog two
13+
</mat-chip>
14+
<mat-chip color="accent">
15+
<mat-chip-avatar>
16+
<img src="https://material.angular.io/assets/img/examples/shiba1.jpg" alt="Photo of a Shiba Inu"/>
17+
</mat-chip-avatar>
18+
Dog three
19+
</mat-chip>
20+
</mat-chip-list>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import {Component} from '@angular/core';
2+
3+
/**
4+
* @title Chips avatar
5+
* @description An avatar inside a chip
6+
*/
7+
@Component({
8+
selector: 'chips-avatar-example',
9+
templateUrl: 'chips-avatar-example.html',
10+
styleUrls: ['chips-avatar-example.css'],
11+
})
12+
export class ChipsAvatarExample {}

src/components-examples/material/chips/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {ChipsOverviewExample} from './chips-overview/chips-overview-example';
1313
import {ChipsStackedExample} from './chips-stacked/chips-stacked-example';
1414
import {ChipsHarnessExample} from './chips-harness/chips-harness-example';
1515
import {ChipsFormControlExample} from './chips-form-control/chips-form-control-example';
16+
import {ChipsAvatarExample} from './chips-avatar/chips-avatar-example';
1617
import {MatButtonModule} from '@angular/material/button';
1718

1819
export {
@@ -23,6 +24,7 @@ export {
2324
ChipsStackedExample,
2425
ChipsHarnessExample,
2526
ChipsFormControlExample,
27+
ChipsAvatarExample,
2628
};
2729

2830
const EXAMPLES = [
@@ -33,6 +35,7 @@ const EXAMPLES = [
3335
ChipsStackedExample,
3436
ChipsHarnessExample,
3537
ChipsFormControlExample,
38+
ChipsAvatarExample,
3639
];
3740

3841
@NgModule({

0 commit comments

Comments
 (0)