From cbfe48549093a7416a567c70f694b2e4b2500250 Mon Sep 17 00:00:00 2001 From: sianida26 Date: Fri, 17 May 2024 18:37:26 +0700 Subject: [PATCH] Added checkbox 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 ef656b1..fafd2bb 100644 --- a/apps/frontend/src/utils/createInputComponents.tsx +++ b/apps/frontend/src/utils/createInputComponents.tsx @@ -1,4 +1,6 @@ import { + Checkbox, + CheckboxProps, Chip, ChipProps, Fieldset, @@ -49,6 +51,10 @@ type ChipType = { type: "chip"; } & Omit; +type CheckboxType = { + type: "checkbox"; +} & CheckboxProps; + type AcceptedInput = ( | TextInputType | MultiSelectInputType @@ -57,6 +63,7 @@ type AcceptedInput = ( | SelectType | ChipType | Group + | CheckboxType ) & GeneralInputProps; @@ -135,6 +142,16 @@ function createInputComponents(options: Options) { /> ); } + + case "checkbox": { + return ( + + ); + } } };