forked from NG-ZORRO/ng-zorro-antd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:tag): support icon in tag
close NG-ZORRO#5628 close NG-ZORRO#4581 BREAK CHANGES: '(nzAfterClose)' Output is going to be removed in 9.0.0. Please use '(nzOnClose)' instead.
- Loading branch information
vthinkxie
committed
Sep 17, 2020
1 parent
e01b80a
commit 1cef1e4
Showing
7 changed files
with
94 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
order: 7 | ||
title: | ||
zh-CN: 图标按钮 | ||
en-US: Icon | ||
--- | ||
|
||
## zh-CN | ||
|
||
在 tag 组件内嵌入 icon。 | ||
|
||
|
||
## en-US | ||
|
||
Tag components can contain an icon. |
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,24 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-tag-icon', | ||
template: ` | ||
<nz-tag nzColor="#55acee"> | ||
<i nz-icon nzType="twitter"></i> | ||
<span>Twitter</span> | ||
</nz-tag> | ||
<nz-tag nzColor="#cd201f"> | ||
<i nz-icon nzType="youtube"></i> | ||
<span>Youtube</span> | ||
</nz-tag> | ||
<nz-tag nzColor="#3b5999"> | ||
<i nz-icon nzType="facebook"></i> | ||
<span>Facebook</span> | ||
</nz-tag> | ||
<nz-tag nzColor="#55acee"> | ||
<i nz-icon nzType="linkedin"></i> | ||
<span>LinkedIn</span> | ||
</nz-tag> | ||
` | ||
}) | ||
export class NzDemoTagIconComponent {} |
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,4 +1,5 @@ | ||
import { NzTagModule } from 'ng-zorro-antd/tag'; | ||
import { NzInputModule } from 'ng-zorro-antd/input'; | ||
import { NzIconModule } from 'ng-zorro-antd/icon'; | ||
|
||
export const moduleList = [ NzTagModule, NzInputModule ]; | ||
export const moduleList = [ NzTagModule, NzInputModule, NzIconModule ]; |
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