import React, { TextareaHTMLAttributes } from 'react';
import { Box } from './Box';
import { Stack } from './Stack';
import { Text } from './Text';
interface TextAreaProps extends TextareaHTMLAttributes {
label?: React.ReactNode;
errorMessage?: string;
variant?: 'default' | 'error';
fullWidth?: boolean;
}
export function TextArea({
label,
errorMessage,
variant = 'default',
fullWidth = true,
className = '',
...props
}: TextAreaProps) {
const isError = variant === 'error' || !!errorMessage;
return (
{label && (
{label}
)}
{errorMessage && (
{errorMessage}
)}
);
}