-
-
Notifications
You must be signed in to change notification settings - Fork 205
Expand file tree
/
Copy pathIDialogPropTypes.tsx
More file actions
60 lines (54 loc) · 1.75 KB
/
IDialogPropTypes.tsx
File metadata and controls
60 lines (54 loc) · 1.75 KB
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
import type { GetContainer } from '@rc-component/util/lib/PortalWrapper';
import type { CSSProperties, ReactNode, SyntheticEvent } from 'react';
export type SemanticName = 'header' | 'body' | 'footer' | 'section' | 'title' | 'wrapper' | 'mask';
export type ModalClassNames = Partial<Record<SemanticName, string>>;
export type ModalStyles = Partial<Record<SemanticName, CSSProperties>>;
export type IDialogPropTypes = {
className?: string;
keyboard?: boolean;
style?: CSSProperties;
rootStyle?: CSSProperties;
mask?: boolean;
children?: React.ReactNode;
afterClose?: () => any;
afterOpenChange?: (open: boolean) => void;
onClose?: (e: SyntheticEvent) => any;
closable?: boolean | ({ closeIcon?: React.ReactNode; disabled?: boolean } & React.AriaAttributes);
maskClosable?: boolean;
visible?: boolean;
destroyOnHidden?: 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>;
extra?: ReactNode;
};