UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

16 lines (15 loc) 470 B
'use client'; import { createContext, memo, use } from 'react'; import { jsx as _jsx } from "react/jsx-runtime"; export var FormContext = /*#__PURE__*/createContext({}); export var FormProvider = /*#__PURE__*/memo(function (_ref) { var children = _ref.children, config = _ref.config; return /*#__PURE__*/_jsx(FormContext, { value: config, children: children }); }); export var useFormContext = function useFormContext() { return use(FormContext); };