UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

29 lines (27 loc) 804 B
"use client"; import { jsx as _jsx } from "react/jsx-runtime"; import { createContext, useContext, useMemo } from "react"; var WebPresentationsContext = /* @__PURE__ */createContext(void 0); function Presentations(param) { var { web, children } = param; var sheet = web === null || web === void 0 ? void 0 : web.sheet; var modal = web === null || web === void 0 ? void 0 : web.modal; var value = useMemo(function () { return sheet || modal ? { sheet, modal } : void 0; }, [sheet, modal]); return /* @__PURE__ */_jsx(WebPresentationsContext.Provider, { value, children }); } function useWebPresentations() { return useContext(WebPresentationsContext); } export { Presentations, useWebPresentations }; //# sourceMappingURL=Presentations.native.js.map