mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 18:09:22 +08:00
a70ef1b8da
* test(badge): add case * fix(badge): fix accidentally rendering an empty element when text props is empty * chore(badge): update demo * test(badge): update snapshot * docs: beautify docs Add several supported ways to describe colors * test(badge): update snapshot * chore: update snapshot * test: update snapshots * Revert "test: update snapshots" This reverts commit 2bd11650aea3b3a447a891f09708032f9c41cb3d. * test: update snapshot
42 lines
777 B
Markdown
42 lines
777 B
Markdown
---
|
|
order: 8
|
|
title:
|
|
zh-CN: 状态点
|
|
en-US: Status
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
用于表示状态的小圆点。
|
|
|
|
## en-US
|
|
|
|
Standalone badge with status.
|
|
|
|
```tsx
|
|
import { Badge, Space } from 'antd';
|
|
import React from 'react';
|
|
|
|
const App: React.FC = () => (
|
|
<>
|
|
<Space>
|
|
<Badge status="success" />
|
|
<Badge status="error" />
|
|
<Badge status="default" />
|
|
<Badge status="processing" />
|
|
<Badge status="warning" />
|
|
</Space>
|
|
<br />
|
|
<Space direction="vertical">
|
|
<Badge status="success" text="Success" />
|
|
<Badge status="error" text="Error" />
|
|
<Badge status="default" text="Default" />
|
|
<Badge status="processing" text="Processing" />
|
|
<Badge status="warning" text="Warning" />
|
|
</Space>
|
|
</>
|
|
);
|
|
|
|
export default App;
|
|
```
|