import React from 'react'; import { Icon } from 'antd'; import classNames from 'classnames'; import styles from './index.less'; export interface ITrendProps { colorful?: boolean; flag: 'up' | 'down'; style?: React.CSSProperties; reverseColor?: boolean; className?: string; } const Trend: React.SFC = ({ colorful = true, reverseColor = false, flag, children, className, ...rest }) => { const classString = classNames( styles.trendItem, { [styles.trendItemGrey]: !colorful, [styles.reverseColor]: reverseColor && colorful, }, className, ); return (
{children} {flag && ( )}
); }; export default Trend;