import clsx from 'clsx'; import { RegisterOptions, useFormContext } from 'react-hook-form'; import { HiExclamationCircle } from 'react-icons/hi'; export type TextAreaProps = { label: string; id: string; placeholder?: string; helperText?: string; readOnly?: boolean; hideError?: boolean; validation?: RegisterOptions; } & React.ComponentPropsWithoutRef<'textarea'>; export default function TextArea({ label, placeholder = '', helperText, id, readOnly = false, hideError = false, validation, ...rest }: TextAreaProps) { const { register, formState: { errors }, } = useFormContext(); return (