import * as React from "react"; import { type FieldPath, type FieldValues, get, useFormContext, useWatch, } from "react-hook-form"; import { FormMessage } from "~/components/FormMessage"; import { Label } from "~/components/Label"; export function TextAreaFormField({ label, name, bottomText, maxLength, }: { label: string; name: FieldPath; bottomText?: string; maxLength: number; }) { const methods = useFormContext(); const value = useWatch({ name }) ?? ""; const id = React.useId(); const error = get(methods.formState.errors, name); return (