Skip to content

Commit 1f6a06f

Browse files
committed
fix: Fixed Types
1 parent e6a5454 commit 1f6a06f

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎src/components/form-builder/dialogs/generate-code-dialog.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from "../helpers/generate-react-code";
1313
import * as prettierPluginEstree from "prettier/plugins/estree";
1414
import { useFormBuilderStore } from "@/stores/form-builder-store";
15+
import type { Plugin } from "prettier";
1516

1617
const getShadcnInstallInstructions = (
1718
dependencies: DependenciesImports
@@ -50,7 +51,7 @@ export function MainExport() {
5051
prettier
5152
.format(generatedCode.code, {
5253
parser: "typescript",
53-
plugins: [parserTypescript, prettierPluginEstree],
54+
plugins: [parserTypescript, prettierPluginEstree as Plugin],
5455
semi: true,
5556
singleQuote: false,
5657
})

‎src/config/available-components.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ import {
3939
getReactCodeText,
4040
getReactCodeCheckboxGroup,
4141
} from "@/components/form-builder/form-components";
42-
import { ZodSchema } from "zod";
43-
import { ControllerRenderProps, FieldName, UseFormReturn } from "react-hook-form";
42+
import { ControllerRenderProps, UseFormReturn } from "react-hook-form";
4443
import { FieldValues } from "react-hook-form";
4544

4645
const typographyComponents: FormComponentModel[] = [
@@ -146,7 +145,7 @@ const formComponents: FormComponentModel[] = [
146145
label_description: "Checkbox Description",
147146
type: "checkbox",
148147
category: "form",
149-
icon: "CheckSquare",
148+
icon: "SquareCheck",
150149
properties: {
151150
style: {
152151
showLabel: "no",
@@ -183,7 +182,7 @@ const formComponents: FormComponentModel[] = [
183182
label_info: "Date picker input",
184183
type: "date",
185184
category: "form",
186-
icon: "CalendarIcon",
185+
icon: "Calendar",
187186
attributes: { placeholder: "Pick a date" },
188187
}),
189188
new FormComponentModel({
@@ -193,7 +192,7 @@ const formComponents: FormComponentModel[] = [
193192
label_description: "Switch Description",
194193
type: "switch",
195194
category: "form",
196-
icon: "ToggleLeftIcon",
195+
icon: "ToggleLeft",
197196
properties: {
198197
style: {
199198
showLabel: "no",

‎src/models/FormComponent.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
FormComponentValidationTypes,
99
FormComponentTypes,
1010
} from "@/types/FormComponent.types";
11-
import * as Icons from "lucide-react";
11+
import { icons } from "lucide-react";
1212

1313
export const DEFAULT_PROPERTIES: FormComponentProperties = {
1414
style: {
@@ -38,7 +38,7 @@ export class FormComponentModel {
3838
options?: FormComponentModelInput["options"];
3939
required?: boolean;
4040
category: "form" | "content";
41-
icon: keyof typeof Icons;
41+
icon: keyof typeof icons;
4242
properties?: FormComponentProperties;
4343
attributes?: FormComponentAttributes;
4444
overrides?: Partial<Record<Viewports, any>>;

0 commit comments

Comments
 (0)