Componentize a bit and consolidate some data

This commit is contained in:
Gabe Kangas
2020-10-28 18:36:25 -07:00
parent 87d69e1665
commit df14a55429
7 changed files with 165 additions and 166 deletions

View File

@@ -0,0 +1,25 @@
import { Statistic, Card, Col} from "antd";
interface ItemProps {
title: string,
value: string,
prefix: JSX.Element,
};
export default function StatisticItem(props: ItemProps) {
const { title, value, prefix } = props;
const valueStyle = { color: "#334", fontSize: "1.8rem" };
return (
<Col span={8}>
<Card>
<Statistic
title={title}
value={value}
valueStyle={valueStyle}
prefix={prefix}
/>
</Card>
</Col>
);
}