/** * A React component to view a PDF document * * @see https://react-pdf-viewer.dev * @license https://react-pdf-viewer.dev/license * @copyright 2019-2024 Nguyen Huu Phuoc */ 'use client'; import * as React from 'react'; import styles from '../styles/annotation.module.css'; import { type PdfJs } from '../types/PdfJs'; import { Annotation } from './Annotation'; import { getContents } from './getContents'; import { getTitle } from './getTitle'; export const StrikeOut: React.FC<{ annotation: PdfJs.Annotation; page: PdfJs.Page; viewport: PdfJs.ViewPort; }> = ({ annotation, page, viewport }) => { const hasPopup = annotation.hasPopup === false; const title = getTitle(annotation); const contents = getContents(annotation); const isRenderable = !!(annotation.hasPopup || title || contents); return ( {(props): React.ReactElement => (
{props.slot.children}
)}
); };