ant-design/components/statistic/demo/animated.tsx
二货爱吃白萝卜 2cdf586291
chore: fix lint (#43873)
* chore: fix lint

* chore: fix lint

* test: fix 16

* fix: lint
2023-07-28 16:17:43 +08:00

19 lines
510 B
TypeScript

import React from 'react';
import CountUp from 'react-countup';
import { Col, Row, Statistic } from 'antd';
const formatter = (value: number) => <CountUp end={value} separator="," />;
const App: React.FC = () => (
<Row gutter={16}>
<Col span={12}>
<Statistic title="Active Users" value={112893} formatter={formatter} />
</Col>
<Col span={12}>
<Statistic title="Account Balance (CNY)" value={112893} precision={2} formatter={formatter} />
</Col>
</Row>
);
export default App;