-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf51b5f
commit 2bb7e9e
Showing
16 changed files
with
1,746 additions
and
2,489 deletions.
There are no files selected for viewing
2,009 changes: 827 additions & 1,182 deletions
2,009
components/tag/__tests__/__snapshots__/demo-extend.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
1,981 changes: 812 additions & 1,169 deletions
1,981
components/tag/__tests__/__snapshots__/demo.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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,29 +1,25 @@ | ||
import { CloseCircleOutlined } from '@ant-design/icons'; | ||
import React from 'react'; | ||
import { Space, Tag } from 'antd'; | ||
|
||
const log = (e: React.MouseEvent<HTMLElement>) => { | ||
console.log(e); | ||
}; | ||
import { CloseCircleOutlined } from '@ant-design/icons'; | ||
import { Flex, Tag } from 'antd'; | ||
|
||
const preventDefault = (e: React.MouseEvent<HTMLElement>) => { | ||
e.preventDefault(); | ||
console.log('Clicked! But prevent default.'); | ||
}; | ||
|
||
const App: React.FC = () => ( | ||
<Space size={[0, 8]} wrap> | ||
<Flex gap="small" wrap="wrap"> | ||
<Tag>Tag 1</Tag> | ||
<Tag> | ||
<a href="https://github.com/ant-design/ant-design/issues/1862">Link</a> | ||
</Tag> | ||
<Tag closeIcon onClose={preventDefault}> | ||
Prevent Default | ||
</Tag> | ||
<Tag closeIcon={<CloseCircleOutlined />} onClose={log}> | ||
<Tag closeIcon={<CloseCircleOutlined />} onClose={console.log}> | ||
Tag 2 | ||
</Tag> | ||
</Space> | ||
</Flex> | ||
); | ||
|
||
export default App; |
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
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,16 +1,16 @@ | ||
import React from 'react'; | ||
import { CloseCircleOutlined } from '@ant-design/icons'; | ||
import { Tag } from 'antd'; | ||
import { Flex, Tag } from 'antd'; | ||
|
||
const App: React.FC = () => ( | ||
<> | ||
<Flex gap="small" wrap="wrap"> | ||
<Tag closable closeIcon="关 闭"> | ||
Tag1 | ||
</Tag> | ||
<Tag closable closeIcon={<CloseCircleOutlined />}> | ||
Tag2 | ||
</Tag> | ||
</> | ||
</Flex> | ||
); | ||
|
||
export default App; |
Oops, something went wrong.