mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-01 06:49:32 +08:00
🎬 update Tag demo
This commit is contained in:
parent
6493db80d4
commit
f22c5d999b
@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`renders ./components/tag/demo/animation.md correctly 1`] = `
|
||||
<div>
|
||||
Array [
|
||||
<div
|
||||
style="margin-bottom:16px"
|
||||
>
|
||||
@ -97,7 +97,7 @@ exports[`renders ./components/tag/demo/animation.md correctly 1`] = `
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
<span
|
||||
class="ant-tag site-tag-plus"
|
||||
>
|
||||
@ -126,17 +126,17 @@ exports[`renders ./components/tag/demo/animation.md correctly 1`] = `
|
||||
</svg>
|
||||
</span>
|
||||
New Tag
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`renders ./components/tag/demo/basic.md correctly 1`] = `
|
||||
<div>
|
||||
Array [
|
||||
<span
|
||||
class="ant-tag"
|
||||
>
|
||||
Tag 1
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag"
|
||||
>
|
||||
@ -145,7 +145,7 @@ exports[`renders ./components/tag/demo/basic.md correctly 1`] = `
|
||||
>
|
||||
Link
|
||||
</a>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag"
|
||||
>
|
||||
@ -171,7 +171,7 @@ exports[`renders ./components/tag/demo/basic.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag"
|
||||
>
|
||||
@ -197,8 +197,8 @@ exports[`renders ./components/tag/demo/basic.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`renders ./components/tag/demo/checkable.md correctly 1`] = `
|
||||
@ -340,14 +340,14 @@ Array [
|
||||
`;
|
||||
|
||||
exports[`renders ./components/tag/demo/control.md correctly 1`] = `
|
||||
<div>
|
||||
Array [
|
||||
<span
|
||||
class="ant-tag edit-tag"
|
||||
>
|
||||
<span>
|
||||
Unremovable
|
||||
</span>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag edit-tag"
|
||||
>
|
||||
@ -375,7 +375,7 @@ exports[`renders ./components/tag/demo/control.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag edit-tag"
|
||||
>
|
||||
@ -403,7 +403,7 @@ exports[`renders ./components/tag/demo/control.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag site-tag-plus"
|
||||
>
|
||||
@ -432,12 +432,12 @@ exports[`renders ./components/tag/demo/control.md correctly 1`] = `
|
||||
</svg>
|
||||
</span>
|
||||
New Tag
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`renders ./components/tag/demo/controlled.md correctly 1`] = `
|
||||
<div>
|
||||
Array [
|
||||
<span
|
||||
class="ant-tag"
|
||||
>
|
||||
@ -463,8 +463,8 @@ exports[`renders ./components/tag/demo/controlled.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<br />
|
||||
</span>,
|
||||
<br />,
|
||||
<button
|
||||
class="ant-btn ant-btn-sm"
|
||||
type="button"
|
||||
@ -472,12 +472,12 @@ exports[`renders ./components/tag/demo/controlled.md correctly 1`] = `
|
||||
<span>
|
||||
Toggle
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</button>,
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`renders ./components/tag/demo/icon.md correctly 1`] = `
|
||||
<div>
|
||||
Array [
|
||||
<span
|
||||
class="ant-tag ant-tag-has-color"
|
||||
style="background-color:#55acee"
|
||||
@ -505,7 +505,7 @@ exports[`renders ./components/tag/demo/icon.md correctly 1`] = `
|
||||
<span>
|
||||
Twitter
|
||||
</span>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag ant-tag-has-color"
|
||||
style="background-color:#cd201f"
|
||||
@ -533,7 +533,7 @@ exports[`renders ./components/tag/demo/icon.md correctly 1`] = `
|
||||
<span>
|
||||
Youtube
|
||||
</span>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag ant-tag-has-color"
|
||||
style="background-color:#3b5999"
|
||||
@ -561,7 +561,7 @@ exports[`renders ./components/tag/demo/icon.md correctly 1`] = `
|
||||
<span>
|
||||
Facebook
|
||||
</span>
|
||||
</span>
|
||||
</span>,
|
||||
<span
|
||||
class="ant-tag ant-tag-has-color"
|
||||
style="background-color:#55acee"
|
||||
@ -589,8 +589,8 @@ exports[`renders ./components/tag/demo/icon.md correctly 1`] = `
|
||||
<span>
|
||||
LinkedIn
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</span>,
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`renders ./components/tag/demo/status.md correctly 1`] = `
|
||||
|
@ -78,7 +78,7 @@ class EditableTagGroup extends React.Component {
|
||||
const { tags, inputVisible, inputValue } = this.state;
|
||||
const tagChild = tags.map(this.forMap);
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<TweenOneGroup
|
||||
enter={{
|
||||
@ -113,7 +113,7 @@ class EditableTagGroup extends React.Component {
|
||||
<PlusOutlined /> New Tag
|
||||
</Tag>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ function preventDefault(e) {
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
<>
|
||||
<Tag>Tag 1</Tag>
|
||||
<Tag>
|
||||
<a href="https://github.com/ant-design/ant-design/issues/1862">Link</a>
|
||||
@ -37,7 +37,7 @@ ReactDOM.render(
|
||||
<Tag closable onClose={preventDefault}>
|
||||
Prevent Default
|
||||
</Tag>
|
||||
</div>,
|
||||
</>,
|
||||
mountNode,
|
||||
);
|
||||
```
|
||||
|
@ -78,7 +78,7 @@ class EditableTagGroup extends React.Component {
|
||||
render() {
|
||||
const { tags, inputVisible, inputValue, editInputIndex, editInputValue } = this.state;
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
{tags.map((tag, index) => {
|
||||
if (editInputIndex === index) {
|
||||
return (
|
||||
@ -143,7 +143,7 @@ class EditableTagGroup extends React.Component {
|
||||
<PlusOutlined /> New Tag
|
||||
</Tag>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class Demo extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
<Tag
|
||||
closable
|
||||
visible={this.state.visible}
|
||||
@ -35,7 +35,7 @@ class Demo extends React.Component {
|
||||
<Button size="small" onClick={() => this.setState({ visible: !this.state.visible })}>
|
||||
Toggle
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ import {
|
||||
} from '@ant-design/icons';
|
||||
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
<>
|
||||
<Tag icon={<TwitterOutlined />} color="#55acee">
|
||||
Twitter
|
||||
</Tag>
|
||||
@ -40,7 +40,7 @@ ReactDOM.render(
|
||||
<Tag icon={<LinkedinOutlined />} color="#55acee">
|
||||
LinkedIn
|
||||
</Tag>
|
||||
</div>,
|
||||
</>,
|
||||
mountNode,
|
||||
);
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user