fix(FE-51) adjust textarea component ui

This commit is contained in:
randy-ar
2025-10-13 13:09:53 +07:00
parent ce8471343c
commit 302da65c59
3 changed files with 4 additions and 6 deletions
+4 -4
View File
@@ -31,7 +31,7 @@ export interface TextAreaProps {
endAdornment?: ReactNode; endAdornment?: ReactNode;
onChange?: ChangeEventHandler<HTMLTextAreaElement>; onChange?: ChangeEventHandler<HTMLTextAreaElement>;
onBlur?: FocusEventHandler<HTMLTextAreaElement>; onBlur?: FocusEventHandler<HTMLTextAreaElement>;
cols?: number; rows?: number;
} }
const TextArea = ({ const TextArea = ({
@@ -52,7 +52,7 @@ const TextArea = ({
onBlur, onBlur,
readOnly = false, readOnly = false,
isLoading = false, isLoading = false,
cols = 3 rows = 3
}: TextAreaProps) => { }: TextAreaProps) => {
return ( return (
<div <div
@@ -87,7 +87,7 @@ const TextArea = ({
<textarea <textarea
className={cn( className={cn(
'input h-12 px-4 py-2 text-base font-normal leading-6 w-full rounded-lg! outline-none! transition-all', 'input h-auto px-4 py-2 text-base font-normal leading-6 w-full rounded-lg! outline-none! transition-all',
{ {
'border-error': isError, 'border-error': isError,
'border-success!': isValid, 'border-success!': isValid,
@@ -98,7 +98,7 @@ const TextArea = ({
name={name} name={name}
placeholder={placeholder} placeholder={placeholder}
value={value} value={value}
cols={cols} rows={rows}
onChange={onChange} onChange={onChange}
onBlur={onBlur} onBlur={onBlur}
disabled={disabled} disabled={disabled}
@@ -307,7 +307,6 @@ const CustomerForm = ({
isError={formik.touched.address && Boolean(formik.errors.address)} isError={formik.touched.address && Boolean(formik.errors.address)}
errorMessage={formik.errors.address} errorMessage={formik.errors.address}
readOnly={formType === 'detail'} readOnly={formType === 'detail'}
cols={8}
/> />
</div> </div>
@@ -348,7 +348,6 @@ const SupplierForm = ({
isError={formik.touched.address && Boolean(formik.errors.address)} isError={formik.touched.address && Boolean(formik.errors.address)}
errorMessage={formik.errors.address} errorMessage={formik.errors.address}
readOnly={formType === 'detail'} readOnly={formType === 'detail'}
cols={8}
/> />
<TextInput <TextInput
required required