-
Notifications
You must be signed in to change notification settings - Fork 183
/
IDialogPropTypes.tsx
69 lines (65 loc) · 1.75 KB
/
IDialogPropTypes.tsx
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import type { GetContainer } from 'rc-util/lib/PortalWrapper';
import type { CSSProperties, ReactNode, SyntheticEvent } from 'react';
export interface ModalClassNames {
header?: string;
body?: string;
footer?: string;
mask?: string;
content?: string;
wrapper?: string;
}
export interface ModalStyles {
header?: CSSProperties;
body?: CSSProperties;
footer?: CSSProperties;
mask?: CSSProperties;
wrapper?: CSSProperties;
content?: CSSProperties;
}
export type IDialogPropTypes = {
className?: string;
keyboard?: boolean;
style?: CSSProperties;
mask?: boolean;
children?: any;
afterClose?: () => any;
afterOpenChange?: (open: boolean) => void;
onClose?: (e: SyntheticEvent) => any;
closable?: boolean | ({ closeIcon?: React.ReactNode } & React.AriaAttributes);
maskClosable?: boolean;
visible?: boolean;
destroyOnClose?: boolean;
mousePosition?: {
x: number;
y: number;
} | null;
title?: ReactNode;
footer?: ReactNode;
transitionName?: string;
maskTransitionName?: string;
animation?: any;
maskAnimation?: any;
wrapStyle?: Record<string, any>;
bodyStyle?: Record<string, any>;
maskStyle?: Record<string, any>;
prefixCls?: string;
wrapClassName?: string;
width?: string | number;
height?: string | number;
zIndex?: number;
bodyProps?: any;
maskProps?: any;
rootClassName?: string;
classNames?: ModalClassNames;
styles?: ModalStyles;
wrapProps?: any;
getContainer?: GetContainer | false;
closeIcon?: ReactNode;
modalRender?: (node: ReactNode) => ReactNode;
forceRender?: boolean;
// https://github.com/ant-design/ant-design/issues/19771
// https://github.com/react-component/dialog/issues/95
focusTriggerAfterClose?: boolean;
// Refs
panelRef?: React.Ref<HTMLDivElement>;
};