UNPKG

@acolyte-test/pdf-viewer-widget

Version:

React wrapper for embedding your PDF Viewer via iframe.

29 lines (28 loc) 720 B
// src/PDFViewerWidget.tsx import { jsx } from "react/jsx-runtime"; var PDFViewerWidget = ({ docId, userId, apiKey, theme = "light", height = "100vh", // Changed default height width = "100%", readonly = false, url = "http://localhost:3000/" }) => { const src = `http://localhost:3000//workspace/pdfnote?id=${docId}&userId=${userId}&apikey=${apiKey}&theme=${theme}&readonly=${readonly}`; return /* @__PURE__ */ jsx( "iframe", { src, width: typeof width === "number" ? `${width}px` : width, height: typeof height === "number" ? `${height}px` : height, style: { border: "none", display: "block" }, allow: "fullscreen" } ); }; export { PDFViewerWidget };