import { memo, TextareaHTMLAttributes } from 'react';
import FieldWrapper from './FieldWrapper';
import { clsx } from 'clsx';
interface TextareaProps extends Omit, 'onChange' | 'value'> {
field: {
id: string;
label?: string;
placeholder?: string;
is_lock?: boolean;
tooltip?: any;
context?: any;
context_html?: string;
rows?: number;
[key: string]: any;
};
value: string;
onChange: (value: string) => void;
fieldStatus?: (id: string, success: boolean) => void;
}
const Textarea = ({ field, value, onChange, fieldStatus, ...props }: TextareaProps) => {
const disabled = field.is_lock === true;
const rows = field.rows ?? 4; // Default to 4 rows if not specified
return (
);
};
export default memo(Textarea);