index.js 579 Bytes
Newer Older
1 2
import React from 'react';
import { Icon } from 'antd';
afc163's avatar
afc163 committed
3 4
import classNames from 'classnames';
import styles from './index.less';
5

afc163's avatar
afc163 committed
6
const IconUp = ({ color, className, ...rest }) => (
7
  <Icon
afc163's avatar
afc163 committed
8 9 10 11
    {...rest}
    className={classNames(styles.normal, className, {
      [styles.up]: color !== false,
    })}
12 13 14 15
    type="caret-up"
  />
);

afc163's avatar
afc163 committed
16
const IconDown = ({ color, className, ...rest }) => (
17
  <Icon
afc163's avatar
afc163 committed
18 19 20 21
    {...rest}
    className={classNames(styles.normal, className, {
      [styles.down]: color !== false,
    })}
22 23 24 25 26 27 28 29
    type="caret-down"
  />
);

export default {
  IconUp,
  IconDown,
};