UNPKG

@pdf-viewer/react

Version:

A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.

46 lines (45 loc) 1.06 kB
import { jsx as u } from "react/jsx-runtime"; import { createContext as l, useContext as n, useMemo as i } from "react"; const e = l({ themeSwitcher: !0, documentProperties: !0, rotateTool: !0, fullscreenTool: !0, openFileTool: !0, dropFileZone: !0, downloadTool: !0, viewModeTool: !0, scrollModeTool: !0, printTool: !0, showPrintProgress: !0, selectionModeTool: !0, jumpNavigationTool: !0, sidebarEnable: !0 }), d = () => n(e), s = { themeSwitcher: !0, documentProperties: !0, rotateTool: !0, fullscreenTool: !0, openFileTool: !0, dropFileZone: !0, downloadTool: !0, viewModeTool: !0, scrollModeTool: !0, printTool: !0, thumbnailTool: !0, showPrintProgress: !0, selectionModeTool: !0, jumpNavigationTool: !0, sidebarEnable: !0 }, c = ({ children: r, slots: o }) => { const t = i(() => ({ ...s, ...o }), [o]); return /* @__PURE__ */ u(e.Provider, { value: t, children: r }); }; export { e as ToolbarComponentContext, c as ToolbarComponentProvider, d as useToolbarComponentContext };