@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
12 lines (11 loc) • 524 B
JavaScript
import { useContext as e } from "react";
import { createFormHookContexts as t } from "@tanstack/react-form";
var { fieldContext: n, formContext: r, useFieldContext: i } = t(), a = "[@mitcsutt/kiln-forms] No form in context: render this component inside <Form form={form}> or <form.AppForm>.";
function o() {
let t = e(r);
if (!t) throw Error(a);
return t;
}
//#endregion
export { a as NO_FORM_CONTEXT, n as fieldContext, r as formContext, i as useFieldContext, o as useFormContext };
//# sourceMappingURL=contexts.js.map