@pdf-viewer/react
Version:
A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.
32 lines (31 loc) • 1.38 kB
JavaScript
import { jsx as t } from "react/jsx-runtime";
import { useFullScreenContext as e } from "../../../../contexts/FullScreenContext.js";
import { UIButton as m } from "../../../ui/Button.js";
import { FullScreenIcon as p } from "../../../icons/FullScreenIcon.js";
import c from "../../../ui/RPTooltip.js";
import { useLocalizationContext as u } from "../../../../contexts/LocalizationContext.js";
import "react";
import "../../../../utils/hooks/useFullScreen.js";
import "../../../../clsx-0c6e471a.js";
import "../../../../utils/withRef.js";
import "../../../../index-35c7f4a2.js";
import "react-dom";
import "../../../../floating-ui.react-dom-6b2fe0df.js";
import "../../../../utils/appConsole.js";
import "../../../../utils/hooks/useLocalization.js";
import "../../../../th_TH-d627cd51.js";
const f = ({ children: r, className: i, localeMessages: o }) => /* @__PURE__ */ t(c, { className: i, content: o == null ? void 0 : o.fullScreenTooltip, children: r }), P = ({ icon: r }) => {
const { isFullScreen: i, toggleFullScreen: o, isSupported: l } = e(), { localeMessages: n } = u();
return /* @__PURE__ */ t(f, { localeMessages: n, children: /* @__PURE__ */ t(
m,
{
disabled: !l,
onClick: o,
"aria-label": i ? "Exit full screen" : "Enter full screen",
children: r || /* @__PURE__ */ t(p, {})
}
) });
};
export {
P as FullScreenTool
};