From c7b5dcf220b02ba29ac56fcfae0193277fe76ae2 Mon Sep 17 00:00:00 2001 From: luizakp Date: Wed, 7 Aug 2024 15:38:03 -0300 Subject: [PATCH 1/3] chore: datetime be w-full --- src/components/FormBuilder/fields/DatePickerInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/FormBuilder/fields/DatePickerInput.tsx b/src/components/FormBuilder/fields/DatePickerInput.tsx index 5eb5edd..da6124b 100644 --- a/src/components/FormBuilder/fields/DatePickerInput.tsx +++ b/src/components/FormBuilder/fields/DatePickerInput.tsx @@ -37,7 +37,7 @@ export const DatePickerInput = withConditional( rules={field.required ? { required: true } : undefined} defaultValue={field.defaultValue} render={({ field: formField }) => ( - + {field.label} @@ -64,7 +64,7 @@ export const DatePickerInput = withConditional( - + {/* @ts-expect-error TS(2739) FIXME: Type '{ mode: string; selected: any; onSelect: any... Remove this comment to see the full error message */} Date: Wed, 7 Aug 2024 15:38:38 -0300 Subject: [PATCH 2/3] chore: add time as input mode --- src/components/FormBuilder/fields/InputField.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/FormBuilder/fields/InputField.tsx b/src/components/FormBuilder/fields/InputField.tsx index afe3572..29b03c3 100644 --- a/src/components/FormBuilder/fields/InputField.tsx +++ b/src/components/FormBuilder/fields/InputField.tsx @@ -12,13 +12,14 @@ import { Input } from "#/components/ui/Input"; import { withConditional } from "../withConditional"; import { BaseField } from "../types"; +import { cn } from "#/lib"; export interface InputFieldProps extends BaseField { length?: { maximum?: number; minimum: number; // undefined or number }; - mode: "text" | "number"; + mode: "text" | "number" | "time"; type: "input"; } @@ -56,7 +57,7 @@ export const InputField = withConditional( } defaultValue={field.defaultValue} render={({ field: formField }) => ( - + {field.label} {field.description} From 7cd4b5a4b3d6a4657d0c6b7eed6eac01908f290a Mon Sep 17 00:00:00 2001 From: luizakp Date: Tue, 20 Aug 2024 11:39:04 -0300 Subject: [PATCH 3/3] fix: lint --- src/components/FormBuilder/fields/InputField.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/FormBuilder/fields/InputField.tsx b/src/components/FormBuilder/fields/InputField.tsx index 29b03c3..a2dc616 100644 --- a/src/components/FormBuilder/fields/InputField.tsx +++ b/src/components/FormBuilder/fields/InputField.tsx @@ -57,7 +57,9 @@ export const InputField = withConditional( } defaultValue={field.defaultValue} render={({ field: formField }) => ( - + {field.label} {field.description}