Skip to content

Commit

Permalink
chore: add time as input mode
Browse files Browse the repository at this point in the history
  • Loading branch information
luizakp committed Aug 7, 2024
1 parent c7b5dcf commit eb1bc66
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/FormBuilder/fields/InputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down Expand Up @@ -56,7 +57,7 @@ export const InputField = withConditional<InputFieldProps>(
}
defaultValue={field.defaultValue}
render={({ field: formField }) => (
<FormItem className="w-full">
<FormItem className={cn( field.mode === "time" ? "w-[240px]": "w-full")}>

Check failure on line 60 in src/components/FormBuilder/fields/InputField.tsx

View workflow job for this annotation

GitHub Actions / Run Type Check & Linters

Replace `·className={cn(·field.mode·===·"time"·?·"w-[240px]":·"w-full")}` with `⏎············className={cn(field.mode·===·"time"·?·"w-[240px]"·:·"w-full")}⏎··········`
<FormLabel tooltip={field.tooltip}>{field.label}</FormLabel>
<FormDescription>{field.description}</FormDescription>
<FormControl>
Expand Down

0 comments on commit eb1bc66

Please sign in to comment.