import { forwardRef } from "react"; import { cn } from "@/src/lib/utils"; interface TextareaProps extends React.TextareaHTMLAttributes { label?: string; error?: string; hint?: string; wrapperClassName?: string; } export const Textarea = forwardRef(function Textarea( { label, error, hint, wrapperClassName = "", className = "", id, ...rest }, ref ) { const taId = id ?? label?.toLowerCase().replace(/\s+/g, "-"); const errorId = taId ? `${taId}-error` : undefined; const hintId = taId ? `${taId}-hint` : undefined; return (
{label && ( )}