9 |
10 | state.updateFormName(newValue)}
14 | />
15 |
16 |
20 | state.updateFormSettings({ importAliasUtils: newValue })
21 | }
22 | />
23 |
27 | state.updateFormSettings({ importAliasComponents: newValue })
28 | }
29 | />
30 |
31 |
32 |
37 | state.updateFormSettings({
38 | noPlaceholder: !state.currentForm.settings.noPlaceholder,
39 | })
40 | }
41 | />
42 |
43 |
48 | state.updateFormSettings({
49 | noDescription: !state.currentForm.settings.noDescription,
50 | })
51 | }
52 | />
53 |
54 |
55 | );
56 | }
57 |
--------------------------------------------------------------------------------
/apps/web/src/app/builder/_components/Preview/component-variants/boolean/checkbox.tsx:
--------------------------------------------------------------------------------
1 | import type { BooleanField, FormFramework } from "formbuilder-core";
2 | import {
3 | FormControl,
4 | FormDescription,
5 | FormField,
6 | FormItem,
7 | FormLabel,
8 | FormMessage,
9 | } from "@/components/ui/form";
10 | import { useFormContext } from "react-hook-form";
11 | import { Checkbox as ShadcnCheckbox } from "@/components/ui/checkbox";
12 |
13 | export function Checkbox({ f }: { f: BooleanField