UNPKG

zod-auto-form

Version:

Auto-generate typed React forms from Zod schemas

15 lines (14 loc) 626 B
import type { BaseField } from "../types/auto-form-type"; import type useFormData from "./hooks/useFromData"; type returnTypeOfHook = ReturnType<typeof useFormData>; declare const RenderField: ({ field, fieldPath, getFieldVisibilityState, form, all_errors, }: { field: BaseField; fieldPath: string; getFieldVisibilityState: (fieldPath: string, formValues: Record<string, unknown>) => { hidden: boolean; disabled: boolean; }; form: returnTypeOfHook["appForm"]; all_errors: returnTypeOfHook["all_errors"]; }) => import("react/jsx-runtime").JSX.Element | null; export default RenderField;