UNPKG

@mitcsutt/kiln-forms

Version:

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

21 lines (20 loc) • 785 B
import type { FormDragAndDrop } from '../components/layouts/Repeater/dragAndDrop.js'; /** * Drag and drop for `Repeater reorderable="drag"`, built on `@mitcsutt/kiln-dnd`. * * @remarks * Give it to the kit once, and every repeater with `reorderable="drag"` gets a drag handle on * each item, in component and schema mode alike: * * ```ts * import { kit } from '@mitcsutt/kiln-forms' * import { dragAndDrop } from '@mitcsutt/kiln-forms/dnd' * * export const formKit = kit.extend({ dragAndDrop }) * ``` * * It needs `@mitcsutt/kiln-dnd` installed (an optional peer dependency) and its stylesheet, * `@mitcsutt/kiln-dnd/styles.css`, imported after kiln-ui's. Forms that don't import this * entry never load kiln-dnd. */ export declare const dragAndDrop: FormDragAndDrop;