printService

This commit is contained in:
hamid zarghami
2025-10-21 14:28:17 +03:30
parent 1351fbd792
commit e25e1cee48
4 changed files with 215 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
import type { FC, InputHTMLAttributes } from 'react'
import Error from './Error'
import { clx } from '../helpers/utils'
type Props = {
label?: string,
error_text?: string
} & InputHTMLAttributes<HTMLTextAreaElement>
const Textarea: FC<Props> = (props: Props) => {
return (
<div className='w-full relative'>
{
props.label &&
<label className='text-sm'>
{props.label}
</label>
}
<textarea
{...props}
className={clx(
'border border-border leading-7 w-full rounded-xl px-4 py-3 min-h-[100px] mt-1 text-xs',
props.readOnly && 'bg-gray-100 border-0 text-description'
)}
>
</textarea>
{
props.error_text &&
<Error errorText={props.error_text} />
}
</div>
)
}
export default Textarea