diff --git a/src/components/Trend/index.js b/src/components/Trend/index.js index cde4ef607f9acf6b3c49d1eee59f77f1683339d8..1cdceb2eeb67283c8b69cc10dbb8a90592a92393 100644 --- a/src/components/Trend/index.js +++ b/src/components/Trend/index.js @@ -3,11 +3,12 @@ import { Icon } from 'antd'; import classNames from 'classnames'; import styles from './index.less'; -const Trend = ({ colorful = true, flag, children, className, ...rest }) => { +const Trend = ({ colorful = true, reverseColor = false, flag, children, className, ...rest }) => { const classString = classNames( styles.trendItem, { [styles.trendItemGrey]: !colorful, + [styles.reverseColor]: reverseColor && colorful, }, className ); diff --git a/src/components/Trend/index.less b/src/components/Trend/index.less index ea66fcf7ba7f5ca004e255a39daae02dfa725bd6..b14b802cb2db73a4e25e9517661498e86866d4d3 100644 --- a/src/components/Trend/index.less +++ b/src/components/Trend/index.less @@ -27,4 +27,11 @@ &.trendItemGrey .down { color: @text-color; } + + &.reverseColor .up { + color: @green-6; + } + &.reverseColor .down { + color: @red-6; + } }