-
-
Notifications
You must be signed in to change notification settings - Fork 50.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add closeIcon customize tag close (#24885)
* feat: add closeIcon customize tag close * docs fix * update snap * fix: css name
- Loading branch information
Showing
7 changed files
with
110 additions
and
19 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,32 @@ | ||
--- | ||
order: 8 | ||
debug: true | ||
title: | ||
zh-CN: 自定义关闭按钮 | ||
en-US: Customize close | ||
--- | ||
|
||
## zh-CN | ||
|
||
可用 `closeIcon` 自定义关闭按钮。 | ||
|
||
## en-US | ||
|
||
The close icon can be customized using `closeIcon`. | ||
|
||
```jsx | ||
import { Tag } from 'antd'; | ||
import { CloseCircleOutlined } from '@ant-design/icons'; | ||
|
||
ReactDOM.render( | ||
<> | ||
<Tag closable closeIcon="关 闭"> | ||
Tag1 | ||
</Tag> | ||
<Tag closable closeIcon={<CloseCircleOutlined />}> | ||
Tag2 | ||
</Tag> | ||
</>, | ||
mountNode, | ||
); | ||
``` |
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