diff --git a/src/components/common/DescriptionTextarea.tsx b/src/components/common/DescriptionTextarea.tsx new file mode 100644 index 00000000..d659ea3d --- /dev/null +++ b/src/components/common/DescriptionTextarea.tsx @@ -0,0 +1,35 @@ +import { useFormContext } from 'react-hook-form'; +import type { RegisterOptions } from 'react-hook-form'; + +type DescriptionTextareaProps = { + id: string; + label: string; + fieldName: string; + validationRole?: RegisterOptions; + placeholder?: string; + errors?: string; +}; + +export default function DescriptionTextarea({ + id, + label, + fieldName, + placeholder, + validationRole, + errors, +}: DescriptionTextareaProps) { + const { register } = useFormContext(); + + return ( +