import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons'; import React from 'react'; 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.FC = ({ theme, title, subTitle, total, subTotal, status, suffix, gap, ...rest }) => (
{title && (
{title}
)} {subTitle && (
{subTitle}
)}
{total} {suffix && {suffix}} {(status || subTotal) && ( {subTotal} {status && status === 'up' ? : } )}
); export default NumberInfo;