This commit is contained in:
Sacha Weatherstone
2023-08-08 08:34:21 +10:00
parent dbd4025ead
commit c682553c67
21 changed files with 1035 additions and 1149 deletions
+6 -3
View File
@@ -1,6 +1,9 @@
import { Button } from "../UI/Button.js";
import { DynamicFormField, FieldProps } from "./DynamicFormField.js";
import { FieldWrapper } from "./FormWrapper.js";
import {
DynamicFormField,
FieldProps,
} from "@components/Form/DynamicFormField.js";
import { FieldWrapper } from "@components/Form/FormWrapper.js";
import { Button } from "@components/UI/Button.js";
import { H4 } from "@components/UI/Typography/H4.js";
import { Subtle } from "@components/UI/Typography/Subtle.js";
import {
+3 -3
View File
@@ -1,6 +1,6 @@
import { GenericInput, InputFieldProps } from "./FormInput.js";
import { SelectFieldProps, SelectInput } from "./FormSelect.js";
import { ToggleFieldProps, ToggleInput } from "./FormToggle.js";
import { GenericInput, InputFieldProps } from "@components/Form/FormInput.js";
import { SelectFieldProps, SelectInput } from "@components/Form/FormSelect.js";
import { ToggleFieldProps, ToggleInput } from "@components/Form/FormToggle.js";
import type { Control, FieldValues } from "react-hook-form";
export type FieldProps<T> =
+2 -2
View File
@@ -1,8 +1,8 @@
import { Input } from "../UI/Input.js";
import type {
BaseFormBuilderProps,
GenericFormElementProps,
} from "./DynamicForm.js";
} from "@components/Form/DynamicForm.js";
import { Input } from "@components/UI/Input.js";
import type { LucideIcon } from "lucide-react";
import { Controller, FieldValues } from "react-hook-form";
+5 -5
View File
@@ -1,14 +1,14 @@
import type {
BaseFormBuilderProps,
GenericFormElementProps,
} from "@components/Form/DynamicForm.js";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "../UI/Select.js";
import type {
BaseFormBuilderProps,
GenericFormElementProps,
} from "./DynamicForm.js";
} from "@components/UI/Select.js";
import { Controller, FieldValues } from "react-hook-form";
export interface SelectFieldProps<T> extends BaseFormBuilderProps<T> {
+2 -2
View File
@@ -1,8 +1,8 @@
import { Switch } from "../UI/Switch.js";
import type {
BaseFormBuilderProps,
GenericFormElementProps,
} from "./DynamicForm.js";
} from "@components/Form/DynamicForm.js";
import { Switch } from "@components/UI/Switch.js";
import { ChangeEvent } from "react";
import { Controller, FieldPathValue, FieldValues } from "react-hook-form";
+1 -1
View File
@@ -1,4 +1,4 @@
import { Label } from "../UI/Label.js";
import { Label } from "@components/UI/Label.js";
import { ErrorMessage } from "@hookform/error-message";
export interface FieldWrapperProps {