diff --git a/src/components/Textarea.tsx b/src/components/Textarea.tsx index 3638665..bdf89c3 100644 --- a/src/components/Textarea.tsx +++ b/src/components/Textarea.tsx @@ -1,4 +1,4 @@ -import { type FC, type InputHTMLAttributes } from 'react' +import { type FC, type TextareaHTMLAttributes } from 'react' import Error from './Error' import { clx } from '../helpers/utils' @@ -6,34 +6,32 @@ type Props = { label?: string, error_text?: string isNotRequired?: boolean -} & InputHTMLAttributes +} & TextareaHTMLAttributes -const Textarea: FC = (props: Props) => { +const Textarea: FC = ({ label, error_text, isNotRequired, className, ...textareaProps }) => { return (
{ - props.label && + label &&
-
{props.label}
- {props.isNotRequired && ( +
{label}
+ {isNotRequired && ( (اختیاری) )}
} + /> { - props.error_text && - + error_text && + }