From 06873bae011b4df73d0f029420a4e6016330776a Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Fri, 17 Jul 2026 11:13:12 +0330 Subject: [PATCH] t a --- src/components/Textarea.tsx | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) 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 && + }