/** * Copyright (c) OpenSpug Organization. https://github.com/openspug/spug * Copyright (c) * Released under the AGPL-3.0 License. */ import React from 'react'; import { Card, Col, Row } from 'antd'; import lodash from 'lodash'; import styles from './index.module.less'; class StatisticsCard extends React.Component { static Item = (props) => { return (
{props.title}

{props.value}

{props.bordered !== false && }
) }; render() { let items = lodash.get(this.props, 'children', []); if (!lodash.isArray(items)) items = [items]; const span = Math.ceil(24 / (items.length || 1)); return ( {items.map((item, index) => ( {item} ))} ) } } export default StatisticsCard