A React client component that renders a PDF file with an embedded iframe viewer and action buttons for previewing and downloading. ## Key Components ### `PdfViewerProps` | Prop | Type | Description | |------|------|-------------| | `src` | `string` | URL of the PDF file to display | | `fileName` | `string?` | Display name shown in the header (defaults to `"PDF Document"`) | | `onPreview` | `() => void?` | Custom preview handler; if omitted, opens `src` in a new tab | | `onDownload` | `() => void?` | Custom download handler; if omitted, opens `src` in a new tab | | `height` | `string?` | Optional height passed to the embedded iframe | ### `PdfViewer` The primary exported component. Renders an empty state with an Adobe PDF icon when `src` is falsy, otherwise displays: - A header row with the PDF icon, file name, and **Preview**/**Download** buttons - An `EmbedIframe` for inline viewing ## Usage Example ```typescript // Basic usage — buttons open src in a new tab // With custom handlers openPreviewModal()} onDownload={() => triggerDownload()} /> ``` ## Notes - When `onPreview` or `onDownload` callbacks are provided, the corresponding button uses `onClick` instead of an `href`, preventing a new tab from opening. - The component is responsive: button layout switches from stacked (`flex-col`) on mobile to inline (`flex-row`) on `sm` breakpoints. - Source: [`pdf-viewer.tsx`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/openframe-frontend-core/src/components/embeds/pdf-viewer.tsx) ## Refactor note Shell now delegates to `EmbedViewerFrame` (`.embed-viewer-frame.md`); rendered output pinned byte-parity by `__tests__/embed-viewer-frame.test.tsx`.