UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

28 lines (24 loc) • 766 B
"use client"; import { 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