Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module: alert): support custom icon (#7691)
- Loading branch information
Showing
7 changed files
with
94 additions
and
6 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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
order: 8 | ||
title: | ||
zh-CN: 自定义图标 | ||
en-US: Custom icon | ||
--- | ||
|
||
## zh-CN | ||
|
||
让信息类型更加醒目, 满足定制化需求。 | ||
|
||
|
||
## en-US | ||
|
||
Make information more clear and more friendly and meet customized needs. |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-alert-custom-icon', | ||
template: ` | ||
<nz-alert | ||
nzType="success" | ||
nzMessage="Success Tips" | ||
nzDescription="Detailed description and advices about successful copywriting." | ||
[nzIcon]="customIconTemplate" | ||
nzShowIcon | ||
></nz-alert> | ||
<ng-template #customIconTemplate> | ||
<div> S </div> | ||
</ng-template> | ||
`, | ||
styles: [ | ||
` | ||
nz-alert { | ||
margin-bottom: 16px; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoAlertCustomIconComponent {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
nz-alert { | ||
display: block; | ||
} | ||
|
||
.@{alert-prefix-cls} { | ||
&-icon { | ||
line-height: 1; | ||
} | ||
} |