-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(material/chips): Update chips docs & examples (#29235)
(cherry picked from commit ec4e974)
- Loading branch information
Showing
16 changed files
with
174 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 17 additions & 5 deletions
22
src/components-examples/material/chips/chips-avatar/chips-avatar-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
<mat-chip-set aria-label="Dog selection"> | ||
<mat-chip> | ||
<img matChipAvatar src="https://material.angular.io/assets/img/examples/shiba1.jpg" alt="Photo of a Shiba Inu"/> | ||
<img | ||
matChipAvatar | ||
src="https://material.angular.io/assets/img/examples/shiba1.jpg" | ||
alt="Photo of a Shiba Inu" | ||
/> | ||
Dog one | ||
</mat-chip> | ||
<mat-chip color="primary"> | ||
<img matChipAvatar src="https://material.angular.io/assets/img/examples/shiba1.jpg" alt="Photo of a Shiba Inu"/> | ||
<mat-chip> | ||
<img | ||
matChipAvatar | ||
src="https://material.angular.io/assets/img/examples/shiba1.jpg" | ||
alt="Photo of a Shiba Inu" | ||
/> | ||
Dog two | ||
</mat-chip> | ||
<mat-chip color="accent"> | ||
<img matChipAvatar src="https://material.angular.io/assets/img/examples/shiba1.jpg" alt="Photo of a Shiba Inu"/> | ||
<mat-chip> | ||
<img | ||
matChipAvatar | ||
src="https://material.angular.io/assets/img/examples/shiba1.jpg" | ||
alt="Photo of a Shiba Inu" | ||
/> | ||
Dog three | ||
</mat-chip> | ||
</mat-chip-set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 10 additions & 7 deletions
17
src/components-examples/material/chips/chips-input/chips-input-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
<mat-form-field class="example-chip-list"> | ||
<mat-label>Favorite Fruits</mat-label> | ||
<mat-chip-grid #chipGrid aria-label="Enter fruits"> | ||
@for (fruit of fruits; track fruit) { | ||
@for (fruit of fruits(); track fruit) { | ||
<mat-chip-row | ||
(removed)="remove(fruit)" | ||
[editable]="true" | ||
(edited)="edit(fruit, $event)" | ||
[aria-description]="'press enter to edit ' + fruit.name"> | ||
[aria-description]="'press enter to edit ' + fruit.name" | ||
> | ||
{{fruit.name}} | ||
<button matChipRemove [attr.aria-label]="'remove ' + fruit.name"> | ||
<mat-icon>cancel</mat-icon> | ||
</button> | ||
</mat-chip-row> | ||
} | ||
<input placeholder="New fruit..." | ||
[matChipInputFor]="chipGrid" | ||
[matChipInputSeparatorKeyCodes]="separatorKeysCodes" | ||
[matChipInputAddOnBlur]="addOnBlur" | ||
(matChipInputTokenEnd)="add($event)"/> | ||
<input | ||
placeholder="New fruit..." | ||
[matChipInputFor]="chipGrid" | ||
[matChipInputSeparatorKeyCodes]="separatorKeysCodes" | ||
[matChipInputAddOnBlur]="addOnBlur" | ||
(matChipInputTokenEnd)="add($event)" | ||
/> | ||
</mat-chip-grid> | ||
</mat-form-field> |
Oops, something went wrong.