ant-design/components/badge/demo/basic.md
afc163 753c01ae18 ES6 syntax for demo code
fix antd.notification
2015-10-28 20:55:49 +08:00

417 B

基本

  • order: 0

简单的徽章展示。


import { Badge } from 'antd';

ReactDOM.render(
  <Badge count="5">
    <a href="#" className="head-example"></a>
  </Badge>
, document.getElementById('components-badge-demo-basic'));
.ant-badge {
  margin-right: 16px;
}
.head-example {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #eee;
  display: inline-block;
}