import { forwardRef, TextareaHTMLAttributes } from 'react';
interface TextareaProps extends TextareaHTMLAttributes {
label?: string;
error?: string;
}
export const Textarea = forwardRef(
({ className = '', label, error, id, ...props }, ref) => {
const textareaId = id || props.name;
return (
{label && (
)}
{error &&
{error}
}
);
}
);
Textarea.displayName = 'Textarea';