import { FC, SelectHTMLAttributes } from 'react' import { clx } from '../helpers/utils' import { ArrowDown2 } from 'iconsax-react' export type ItemsSelectType = { value: string, label: string, } type Props = { className?: string, items: ItemsSelectType[], error_text?: string, placeholder?: string, label?: string, readOnly?: boolean, } & SelectHTMLAttributes const Select: FC = (props: Props) => { return ( { props.label && {props.label} } { props.placeholder && {props.placeholder} } { props.items?.map((item) => { return ( {item.label} ) }) } { props.error_text && props.error_text !== '' ? {props.error_text} : null } ) } export default Select