import { type FC, type SelectHTMLAttributes } from 'react' import { clx } from '../helpers/utils' import { ArrowDown2 } from 'iconsax-react' import Error from './Error' export type ItemsSelectType = { value: string, label: string, } type Props = { className?: string, items: ItemsSelectType[], error_text?: string, placeholder?: string, label?: string, value?: string, } & 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 !== '' ? : null } ) } export default Select