import React from "react"; import Select, { components } from 'react-select'; import './select.css'; import { ReactComponent as DropDown } from '../../../assets/images/icons/Dropdown.svg' type OptionProps = { label: string, value: string | number } type Porps = { label?: string, id:string, name: string, placeholder?: string, isClearable?: boolean, isDisabled?: boolean, isSearchable?: boolean, isMulti?: boolean, helperText?: string, error?: boolean, errorMessage?: string, size?: 'default' | 'small' | 'medium' | 'large', borderRadious?: 'small' | 'medium' | 'large', variant?: 'default' |'primary' | 'secondary', handleChange: (event:any) => void; } const slectOptin:OptionProps[] = [ { value: 'AF', label: 'Afghanistan' }, { value: 'AO', label: 'Angola' }, { value: 'AR', label: 'Argentina' }, { value: 'BD', label: 'Bangladesh' }, { value: 'BE', label: 'Belgium' }, { value: 'BM', label: 'Bermuda' } ]; const DropdownIndicator = (props: any) => { return ( ); }; const Option = (props:any) => { return (
null} />{" "}
); }; const MultiValue = (props:any) => ( {props.data.label} ); const SelectBox = (props:Porps) => { const {label, id, placeholder, isClearable, isDisabled, name, isSearchable,variant,borderRadious, isMulti,helperText,error,errorMessage, size, handleChange} = props; return (
{ isMulti ? } {(error && errorMessage) &&

{errorMessage}

} {(!error && helperText) &&

{helperText}

}
); }; export default SelectBox;