ant-design/components/badge/demo/no-wrapper.md
二货机器人 20788d870c
fix: Badge should not do motion when appear (#28003)
* fix: Badge no need appear motion

* test: Update snapshot
2020-11-25 19:49:44 +08:00

837 B

order title
1
zh-CN en-US
独立使用 Standalone

zh-CN

不包裹任何元素即是独立使用,可自定样式展现。

在右上角的 badge 则限定为红色。

en-US

Used in standalone when children is empty.

import { Badge, Space } from 'antd';

const Demo = () => (
  <Space>
    <Badge count={25} />
    <Badge count={4} className="site-badge-count-4" />
    <Badge className="site-badge-count-109" count={109} style={{ backgroundColor: '#52c41a' }} />
  </Space>
);

ReactDOM.render(<Demo />, mountNode);
.site-badge-count-4 .ant-badge-count {
  background-color: #fff;
  color: #999;
  box-shadow: 0 0 0 1px #d9d9d9 inset;
}