import type { TextareaHTMLAttributes } from 'react'
type TextareaProps = TextareaHTMLAttributes & {
label?: string
error?: string
required?: boolean
}
export function Textarea({ label, error, required, className = '', id, ...props }: TextareaProps) {
const inputId = id || label?.toLowerCase().replace(/\s+/g, '-')
return (
{label && (
)}
{error &&
{error}
}
)
}