From 933fff14265967feb853d01d9e71bd4d9bdcc427 Mon Sep 17 00:00:00 2001 From: Nikhila C <115739037+NikhilA8606@users.noreply.github.com> Date: Wed, 29 Jan 2025 18:05:38 +0530 Subject: [PATCH] Replaced all TextAreaForm component with Textarea shadcn ui component (#10277) --- public/locale/en.json | 1 + .../Form/FormFields/TextAreaFormField.tsx | 56 ------------------- .../Resource/ResourceCommentSection.tsx | 14 ++--- .../Resource/ResourceDetailsUpdate.tsx | 21 +++++-- 4 files changed, 23 insertions(+), 69 deletions(-) delete mode 100644 src/components/Form/FormFields/TextAreaFormField.tsx diff --git a/public/locale/en.json b/public/locale/en.json index 19132126140..4baaa151214 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -1308,6 +1308,7 @@ "no_beds_available": "No beds available", "no_changes": "No changes", "no_changes_made": "No changes made", + "no_comments_available": "No comments available", "no_consultation_filed": "No consultation filed", "no_consultation_history": "No consultation history available", "no_consultation_updates": "No consultation updates", diff --git a/src/components/Form/FormFields/TextAreaFormField.tsx b/src/components/Form/FormFields/TextAreaFormField.tsx deleted file mode 100644 index 70b0000a0b5..00000000000 --- a/src/components/Form/FormFields/TextAreaFormField.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { forwardRef } from "react"; - -import FormField from "@/components/Form/FormFields/FormField"; -import { - FormFieldBaseProps, - useFormFieldPropsResolver, -} from "@/components/Form/FormFields/Utils"; - -import { classNames } from "@/Utils/utils"; - -export type TextAreaFormFieldProps = FormFieldBaseProps & { - placeholder?: string; - value?: string | number; - rows?: number; - // prefixIcon?: React.ReactNode; - // suffixIcon?: React.ReactNode; - innerClassName?: string; - onFocus?: (event: React.FocusEvent) => void; - onBlur?: (event: React.FocusEvent) => void; -}; - -/** - * @deprecated use shadcn/ui's textarea instead - */ -const TextAreaFormField = forwardRef( - ( - { rows = 3, ...props }: TextAreaFormFieldProps, - ref?: React.Ref, - ) => { - const field = useFormFieldPropsResolver(props); - return ( - -