ant-design/components/badge/demo/dot.md

34 lines
571 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 3
title:
zh-CN: 讨嫌的小红点
en-US: Red badge
2016-03-31 09:40:55 +08:00
---
2015-09-01 13:59:07 +08:00
## zh-CN
2015-09-01 13:59:07 +08:00
没有具体的数字。
## en-US
2019-05-07 14:57:32 +08:00
This will simply display a red badge, without a specific count. If count equals 0, it won't display the dot.
```tsx
import { NotificationOutlined } from '@ant-design/icons';
2022-05-21 22:14:15 +08:00
import { Badge } from 'antd';
import React from 'react';
2015-09-01 13:59:07 +08:00
const App: React.FC = () => (
<>
<Badge dot>
<NotificationOutlined style={{ fontSize: 16 }} />
</Badge>
<Badge dot>
<a href="#">Link something</a>
</Badge>
</>
2018-11-28 15:00:03 +08:00
);
export default App;
2019-05-07 14:57:32 +08:00
```