UNPKG

618 BTypeScriptView Raw
1import { RefObject } from "react";
2import type { Font } from "./font";
3export interface UseReactToPrintOptions {
4 bodyClass?: string;
5 contentRef?: RefObject<Element | Text>;
6 documentTitle?: string;
7 fonts?: Font[];
8 ignoreGlobalStyles?: boolean;
9 nonce?: string;
10 onAfterPrint?: () => void;
11 onBeforePrint?: () => Promise<void>;
12 onPrintError?: (errorLocation: "onBeforePrint" | "print", error: Error) => void;
13 pageStyle?: string;
14 preserveAfterPrint?: boolean;
15 print?: (target: HTMLIFrameElement) => Promise<any>;
16 suppressErrors?: boolean;
17 copyShadowRoots?: boolean;
18}