import { TextareaHTMLAttributes, forwardRef } from 'react'; import { cn } from '../../utils'; interface TextareaProps extends TextareaHTMLAttributes { label?: string; error?: string; helperText?: string; resize?: boolean; } const Textarea = forwardRef( ({ className, label, error, helperText, resize = true, ...props }, ref) => { return ( {label && ( {label} )} {error && ( {error} )} {helperText && !error && ( {helperText} )} ); } ); Textarea.displayName = 'Textarea'; export { Textarea };
{error}
{helperText}