UNPKG

one

Version:

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

26 lines (24 loc) 643 B
"use client"; import { createContext, useContext, useMemo } from "react"; import { jsx } from "react/jsx-runtime"; const WebPresentationsContext = createContext(void 0); function Presentations({ web, children }) { const sheet = web?.sheet; const modal = web?.modal; const value = useMemo(() => 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.mjs.map