import React from 'react'; import './text-area.css'; type Props = { label?: string, placeholder?: string, id:string, name: string, disable?: boolean, readonly?: boolean, size?: 'default' | 'small' | 'medium' | 'large', rows: number, fixedSize: boolean, helperText?: string, error?: boolean, errorMessage?: string, borderRadious?: 'small' | 'medium' | 'large', variant: 'default' |'primary' | 'secondary', handleChange: (event: React.ChangeEvent) => void; } const TextArea = (props:Props) => { const {label, placeholder,id, name, disable, readonly, size,helperText,error,errorMessage,variant,borderRadious, rows, fixedSize, handleChange} = props; const style:any = { resize: fixedSize ? 'none' : 'vertical' } return ( <>
{(error && errorMessage) &&

{errorMessage}

} {(!error && helperText) &&

{helperText}

}
) } export default TextArea;