diff --git a/src/components/ui/auto-form/types.ts b/src/components/ui/auto-form/types.ts index b977467..d76337e 100644 --- a/src/components/ui/auto-form/types.ts +++ b/src/components/ui/auto-form/types.ts @@ -4,13 +4,15 @@ import { INPUT_COMPONENTS } from "./config"; export type FieldConfigItem = { description?: React.ReactNode; - inputProps?: React.InputHTMLAttributes & { + inputProps?: React.InputHTMLAttributes & + React.TextareaHTMLAttributes & + { showLabel?: boolean; }; label?: string; fieldType?: - | keyof typeof INPUT_COMPONENTS - | React.FC; + | keyof typeof INPUT_COMPONENTS + | React.FC; renderParent?: (props: { children: React.ReactNode; @@ -20,8 +22,8 @@ export type FieldConfigItem = { export type FieldConfig>> = { // If SchemaType.key is an object, create a nested FieldConfig, otherwise FieldConfigItem [Key in keyof SchemaType]?: SchemaType[Key] extends object - ? FieldConfig> - : FieldConfigItem; + ? FieldConfig> + : FieldConfigItem; }; export enum DependencyType { @@ -41,9 +43,9 @@ type BaseDependency>> = { export type ValueDependency>> = BaseDependency & { type: - | DependencyType.DISABLES - | DependencyType.REQUIRES - | DependencyType.HIDES; + | DependencyType.DISABLES + | DependencyType.REQUIRES + | DependencyType.HIDES; }; export type EnumValues = readonly [string, ...string[]];