-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
46 lines (40 loc) · 1.42 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import * as React from 'react';
import * as PropTypes from 'prop-types';
/*~ This declaration specifies that the class constructor function
*~ is the exported object from the file
*/
export = sofaPrint
declare module sofaPrint {
export function PageBreak(): React.ReactElement<any, any>;
export class PrintPage extends React.Component<PrintPage.PrintPageProps, any> {
static propTypes: {
previewStyle: PropTypes.Requireable<boolean>,
pageWidth: PropTypes.Requireable<number>,
goBack: PropTypes.Requireable<PrintPage.PrintCallbackFn>,
onBeforePrint: PropTypes.Requireable<PrintPage.PrintCallbackFn>,
onAfterPrint: PropTypes.Requireable<PrintPage.PrintCallbackFn>,
showGoBackButton: PropTypes.Requireable<boolean>,
printText: PropTypes.Requireable<string>,
printDesc: PropTypes.Requireable<string>,
};
static defaultProps: Partial<PrintPage.PrintPageProps>;
private componentRef;
printMethod(): () => void;
handlePrint(): () => void;
handleGoBack(): () => void;
render(): React.ReactElement<any, any>;
}
namespace PrintPage {
type PrintCallbackFn = () => void;
export interface PrintPageProps {
previewStyle: boolean,
pageWidth: number,
goBack: PrintCallbackFn,
showGoBackButton: boolean,
onBeforePrint?: PrintCallbackFn,
onAfterPrint?: PrintCallbackFn,
printText?: string,
printDesc?: string,
}
}
}