mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 06:09:34 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
31 lines
516 B
Markdown
31 lines
516 B
Markdown
---
|
|
order: 3
|
|
title:
|
|
zh-CN: 讨嫌的小红点
|
|
en-US: Red badge
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
没有具体的数字。
|
|
|
|
## en-US
|
|
|
|
This will simply display a red badge, without a specific count. If count equals 0, it won't display the dot.
|
|
|
|
```jsx
|
|
import { Badge } from 'antd';
|
|
import { NotificationOutlined } from '@ant-design/icons';
|
|
|
|
export default () => (
|
|
<>
|
|
<Badge dot>
|
|
<NotificationOutlined style={{ fontSize: 16 }} />
|
|
</Badge>
|
|
<Badge dot>
|
|
<a href="#">Link something</a>
|
|
</Badge>
|
|
</>
|
|
);
|
|
```
|