mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
06dff86287
* fix: Badge count style when customize color close #31590 close #31591 * add demo for debug * update badge demos * create ribbon.test.tsx
32 lines
524 B
Markdown
32 lines
524 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';
|
|
|
|
ReactDOM.render(
|
|
<>
|
|
<Badge dot>
|
|
<NotificationOutlined style={{ fontSize: 16 }} />
|
|
</Badge>
|
|
<Badge dot>
|
|
<a href="#">Link something</a>
|
|
</Badge>
|
|
</>,
|
|
mountNode,
|
|
);
|
|
```
|