mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 16:39:41 +08:00
37 lines
867 B
TypeScript
37 lines
867 B
TypeScript
|
import React from 'react';
|
||
|
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
|
||
|
import { Card, Col, Row, Statistic } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<div className="site-statistic-demo-card">
|
||
|
<Row gutter={16}>
|
||
|
<Col span={12}>
|
||
|
<Card>
|
||
|
<Statistic
|
||
|
title="Active"
|
||
|
value={11.28}
|
||
|
precision={2}
|
||
|
valueStyle={{ color: '#3f8600' }}
|
||
|
prefix={<ArrowUpOutlined />}
|
||
|
suffix="%"
|
||
|
/>
|
||
|
</Card>
|
||
|
</Col>
|
||
|
<Col span={12}>
|
||
|
<Card>
|
||
|
<Statistic
|
||
|
title="Idle"
|
||
|
value={9.3}
|
||
|
precision={2}
|
||
|
valueStyle={{ color: '#cf1322' }}
|
||
|
prefix={<ArrowDownOutlined />}
|
||
|
suffix="%"
|
||
|
/>
|
||
|
</Card>
|
||
|
</Col>
|
||
|
</Row>
|
||
|
</div>
|
||
|
);
|
||
|
|
||
|
export default App;
|