From 127e2679e945cfb2b90f81159c703fad586bbd48 Mon Sep 17 00:00:00 2001 From: sianida26 Date: Sat, 18 May 2024 02:15:09 +0700 Subject: [PATCH] Added textarea element --- .../src/utils/createInputComponents.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/frontend/src/utils/createInputComponents.tsx b/apps/frontend/src/utils/createInputComponents.tsx index fafd2bb..e4a6e1e 100644 --- a/apps/frontend/src/utils/createInputComponents.tsx +++ b/apps/frontend/src/utils/createInputComponents.tsx @@ -15,6 +15,8 @@ import { SelectProps, TextInput, TextInputProps, + Textarea, + TextareaProps, } from "@mantine/core"; import { ReactNode } from "@tanstack/react-router"; @@ -55,6 +57,10 @@ type CheckboxType = { type: "checkbox"; } & CheckboxProps; +type TextareaType = { + type: "textarea"; +} & TextareaProps; + type AcceptedInput = ( | TextInputType | MultiSelectInputType @@ -64,6 +70,7 @@ type AcceptedInput = ( | ChipType | Group | CheckboxType + | TextareaType ) & GeneralInputProps; @@ -152,6 +159,16 @@ function createInputComponents(options: Options) { /> ); } + + case "textarea": { + return ( +