import React, { FC } from 'react';
import { components } from 'react-select';
import { IndicatorProps } from 'react-select/lib/components/indicators';
import { Icon } from '../../Icon';
import { SvgCaretDown } from '../../../assets/images/icons';
import { OptionType } from '../Select';

export const DropdownIndicator: FC<IndicatorProps<OptionType>> = props => {
  return (
    components.DropdownIndicator && (
      <components.DropdownIndicator {...props}>
        <Icon Asset={SvgCaretDown} width={12} height={8} />
      </components.DropdownIndicator>
    )
  );
};
