import type { FC, TextareaHTMLAttributes } from 'react';
import { cn } from '../../lib/utils';
interface TextAreaProps extends TextareaHTMLAttributes {
label?: string;
error?: string;
}
export const TextArea: FC = ({ label, error, className, id, ...props }) => {
const areaId = id ?? (label ? `textarea-${label.replace(/\s+/g, '-').toLowerCase()}` : undefined);
return (
{label && (
)}
{error &&
{error}
}
);
};
export default TextArea;