diff --git a/src/components/Form/Select/Select.tsx b/src/components/Form/Select/Select.tsx index b5416d2..aad51fa 100644 --- a/src/components/Form/Select/Select.tsx +++ b/src/components/Form/Select/Select.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useController } from 'react-hook-form'; /* eslint-disable react/react-in-jsx-scope */ -export const Select = ({ control, name, label, options }: SelectProps) => { +export const Select = ({ control, name, label, options, disabled = false }: SelectProps) => { const { field, // fieldState: { invalid, isTouched, isDirty }, @@ -27,6 +27,7 @@ export const Select = ({ control, name, label, options }: SelectProps) => { name={name} // send down the input name ref={field.ref} // send input ref, so we can focus on input when error appear className="shadow-sm focus:ring-primary-500 focus:border-primary-500 block w-full sm:text-sm border-gray-300 rounded-md" + disabled={disabled} > {options?.map((option) => (