ant-design/components/statistic/demo/unit.md
MadCcc 6776bb8916
docs: demo support react18 (#34843)
* 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
2022-04-03 23:27:45 +08:00

516 B

order title
1
zh-CN en-US
单位 Unit

zh-CN

通过前缀和后缀添加单位。

en-US

Add unit through prefix and suffix.

import { Statistic, Row, Col } from 'antd';
import { LikeOutlined } from '@ant-design/icons';

export default () => (
  <Row gutter={16}>
    <Col span={12}>
      <Statistic title="Feedback" value={1128} prefix={<LikeOutlined />} />
    </Col>
    <Col span={12}>
      <Statistic title="Unmerged" value={93} suffix="/ 100" />
    </Col>
  </Row>
);