import React, { ReactNode, useRef } from 'react'; import InputError from './InputError'; export interface SelectOptionType { title: ReactNode | string; value: string; disabled?: boolean; selected?: boolean; } export interface SelectProps { /** * callback function when the button is clicked */ callback: (e: object, id: string) => void; /** * the text of the button or selected item */ title?: ReactNode; /** * the text of the error */ error?: string; /** * if the required should added or not */ required?: boolean; /** * if the optional text should be shown or not */ optional?: boolean; /** * the rounding amount of the button */ defaultValue?: string; /** * the list options of the button */ options?: SelectOptionType[]; id?: string; name?: string; theme?: string; /** * Classes to be added to the `
` wrapping the label and select. */ labelTheme?: string; /** * Classes to be added to the `
); }; export default Select;