UNPKG

@mitcsutt/kiln-forms

Version:

Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui

18 lines (17 loc) • 854 B
import type { AnyKitForm } from '../../kit/types.js'; import type { UntypedFormSchema } from '../core/types.js'; import { type SchemaRegistries } from './context.js'; export interface SchemaRendererProps { form: AnyKitForm; schema: UntypedFormSchema; context?: Record<string, unknown>; registries: SchemaRegistries; } export interface SchemaNodeRendererProps extends SchemaRendererProps { id: string; prefix?: string; } /** Renders a whole schema (§10.6). The static analysis is cached per schema object. */ export declare function SchemaFormRenderer(props: SchemaRendererProps): import("react").JSX.Element; /** Renders one node of a schema by `id`. Unknown ids render nothing and warn in dev. */ export declare function SchemaNodeRenderer({ id, prefix, ...props }: SchemaNodeRendererProps): import("react").JSX.Element | null;