import ReactSelect, { Props as ReactSelectProps } from 'react-select';

export type SelectProps = ReactSelectProps;

export const Select = (props: SelectProps) => {
    return (
        <ReactSelect
            {...props}
            isClearable
            styles={{
                control: (baseStyles) => ({
                    ...baseStyles,
                    borderColor: '#bbb',
                    backgroundColor: props.isDisabled == true ? '#f3f5f9' : '',
                }),
                menu: (baseStyles) => ({
                    ...baseStyles,
                    zIndex: 9999,
                }),
            }}
        />
    );
};
