Browse Source

docs: update tag status demo (#26971)

pull/26978/head
xrk 4 years ago
committed by GitHub
parent
commit
4f177ddc96
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      components/tag/__tests__/__snapshots__/demo.test.js.snap
  2. 7
      components/tag/demo/status.md

26
components/tag/__tests__/__snapshots__/demo.test.js.snap

@ -642,10 +642,17 @@ Array [
exports[`renders ./components/tag/demo/status.md correctly 1`] = `
Array [
<div>
<h4>
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
role="separator"
>
<span
class="ant-divider-inner-text"
>
Without icon
</h4>
</span>
</div>,
<div>
<span
class="ant-tag ant-tag-success"
>
@ -672,10 +679,17 @@ Array [
default
</span>
</div>,
<div>
<h4>
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
role="separator"
>
<span
class="ant-divider-inner-text"
>
With icon
</h4>
</span>
</div>,
<div>
<span
class="ant-tag ant-tag-success"
>

7
components/tag/demo/status.md

@ -14,7 +14,7 @@ title:
We preset five different colors, you can set color property such as `success`,`processing`,`error`,`default` and `warning` to indicate specific status.
```jsx
import { Tag } from 'antd';
import { Tag, Divider } from 'antd';
import {
CheckCircleOutlined,
SyncOutlined,
@ -26,17 +26,16 @@ import {
ReactDOM.render(
<>
<Divider orientation="left">Without icon</Divider>
<div>
<h4>Without icon</h4>
<Tag color="success">success</Tag>
<Tag color="processing">processing</Tag>
<Tag color="error">error</Tag>
<Tag color="warning">warning</Tag>
<Tag color="default">default</Tag>
</div>
<Divider orientation="left">With icon</Divider>
<div>
<h4>With icon</h4>
<Tag icon={<CheckCircleOutlined />} color="success">
success
</Tag>

Loading…
Cancel
Save