import { FunctionComponent } from 'react'; import { UseFormRegisterReturn } from 'react-hook-form'; interface FormSelectProps { options: readonly { value: string; text: string }[]; id: string; formRegister: UseFormRegisterReturn; error: boolean; placeholder: string; message: string; } /** * @example * ; * * @param props * @param props.options The options to display in the select. * @param props.id The id of the select. * @param props.formRegister The form register hook from react-hook-form. * @param props.error Whether or not the select has an error. * @param props.placeholder The placeholder text for the select. * @param props.message The message to display when no option is selected. */ const FormSelect: FunctionComponent = ({ options, id, error, formRegister, placeholder, message, }) => ( ); export default FormSelect;