import { useTheme } from '@emotion/react'; import { InputHTMLAttributes, ReactNode, useEffect, useState } from 'react'; import Select, { FormatOptionLabelMeta, GroupBase, OptionsOrGroups, } from 'react-select'; import FormField from '~/components/common/form/_form_field'; type Option = { label: string | number; value: string | number }; interface SelectorProps extends Omit, 'onChange'> { label: string; name: string; errors?: string[]; options: OptionsOrGroups>; value: number | string; onChangeCallback?: (value: number | string) => void; formatOptionLabel?: ( data: Option, formatOptionLabelMeta: FormatOptionLabelMeta