UNPKG

@payfit/unity-components

Version:

23 lines (22 loc) 694 B
import { useFormContext as e } from "../../hooks/tanstack-form-context.js"; import { forwardRef as t } from "react"; import { uyTv as n } from "@payfit/unity-themes"; import { jsx as r } from "react/jsx-runtime"; //#region src/components/form/TanstackForm.tsx var i = n({ base: [] }), a = t(({ children: t, onSubmit: n, className: a, ...o }, s) => { let c = e(); return /* @__PURE__ */ r("form", { "data-dd-privacy": "mask", onSubmit: (e) => { e.preventDefault(), e.stopPropagation(), c.handleSubmit(e), n?.(e); }, ...o, ref: s, noValidate: !0, className: i({ className: a }), children: t }); }); a.displayName = "TanstackForm"; //#endregion export { a as TanstackForm };