import { TextareaHTMLAttributes, forwardRef } from 'react' import { clsx } from 'clsx' interface TextareaProps extends TextareaHTMLAttributes { label?: string error?: string helperText?: string } const Textarea = forwardRef( ({ label, error, helperText, className, ...props }, ref) => { return ( {label && ( {label} )} {error && {error}} {helperText && !error && ( {helperText} )} ) } ) Textarea.displayName = 'Textarea' export default Textarea
{error}
{helperText}