'use client'; import { ChangeEventHandler, FocusEventHandler, ReactNode } from 'react'; import { cn } from '@/lib/helper'; export interface TextAreaProps { label?: string; bottomLabel?: string; name: string; value?: string | number; placeholder?: string; className?: { wrapper?: string; label?: string; inputWrapper?: string; input?: string; }; isError?: boolean; isValid?: boolean; disabled?: boolean; readOnly?: boolean; required?: boolean; isLoading?: boolean; errorMessage?: string; startAdornment?: ReactNode; endAdornment?: ReactNode; onChange?: ChangeEventHandler; onBlur?: FocusEventHandler; rows?: number; ref?: React.RefObject; } const TextArea = ({ label, bottomLabel, name, value, placeholder, className, isError, isValid, errorMessage, startAdornment, endAdornment, disabled = false, required = false, onChange, onBlur, readOnly = false, isLoading = false, rows = 3, ref, }: TextAreaProps) => { return (
{label && ( )} {startAdornment && startAdornment}