import React from 'react'; import { useController } from 'react-hook-form'; /* eslint-disable react/react-in-jsx-scope */ export const Select = ({ control, name, label, options, disabled = false }: SelectProps) => { const { field, // fieldState: { invalid, isTouched, isDirty }, // formState: { touchedFields, dirtyFields }, } = useController({ name, control, }); return ( <> {label && ( )} ); }; type SelectProps = { control: any; name: string; label?: string; options?: any[]; disabled?: boolean; };