ant-design/components/statistic/demo/card.tsx
afc163 7d77f3173d
site: improve demo card style (#40028)
* site: improve demo card style

* test: update snapshot

* test: update snapshot

* fix: demo card border

* docs: fix dark mode

* style: fix color
2023-01-05 15:30:59 +08:00

35 lines
795 B
TypeScript

import React from 'react';
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
import { Card, Col, Row, Statistic } from 'antd';
const App: React.FC = () => (
<Row gutter={16}>
<Col span={12}>
<Card bordered={false}>
<Statistic
title="Active"
value={11.28}
precision={2}
valueStyle={{ color: '#3f8600' }}
prefix={<ArrowUpOutlined />}
suffix="%"
/>
</Card>
</Col>
<Col span={12}>
<Card bordered={false}>
<Statistic
title="Idle"
value={9.3}
precision={2}
valueStyle={{ color: '#cf1322' }}
prefix={<ArrowDownOutlined />}
suffix="%"
/>
</Card>
</Col>
</Row>
);
export default App;