import React from 'react'; import { Icon } from 'antd'; import classNames from 'classnames'; import styles from './index.less'; export interface NumberInfoProps { title?: React.ReactNode | string; subTitle?: React.ReactNode | string; total?: React.ReactNode | string; status?: 'up' | 'down'; theme?: string; gap?: number; subTotal?: number; suffix?: string; style?: React.CSSProperties; } const NumberInfo: React.SFC = ({ theme, title, subTitle, total, subTotal, status, suffix, gap, ...rest }) => (
{title && (
{title}
)} {subTitle && (
{subTitle}
)}
{total} {suffix && {suffix}} {(status || subTotal) && ( {subTotal} {status && } )}
); export default NumberInfo;