react-hook-form-builder
Version:
light weight schema Form builder for react-hook-form
20 lines (19 loc) • 768 B
JavaScript
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
export var FormBuilderContext = React.createContext({});
var FormBuilderProvider = function (_a) {
var children = _a.children, elements = _a.elements;
return _jsx(FormBuilderContext.Provider, __assign({ value: { elements: elements } }, { children: children }));
};
export default FormBuilderProvider;