@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
15 lines (14 loc) • 536 B
TypeScript
export interface RegistryEntry {
/** Unique within the registry (the tab / step `value`). */
key: string;
/** The entry's panel element, used to keep entries in DOM order. */
element(): HTMLElement | null;
}
/**
* Parts (tabs, steps) register with their container on mount, so wrapped parts (`When`, schema
* node components) work and a hidden part drops out. Entries are kept in DOM order.
*/
export declare function useOrderedRegistry<E extends RegistryEntry>(): [
readonly E[],
(entry: E) => () => void
];