1 | import * as React from 'react';
|
2 | import useModal from './useModal';
|
3 | import { LegacyButtonType, ButtonProps } from '../button/button';
|
4 | import { DirectionType } from '../config-provider';
|
5 | export declare const destroyFns: Array<() => void>;
|
6 | export interface ModalProps {
|
7 |
|
8 | visible?: boolean;
|
9 |
|
10 | confirmLoading?: boolean;
|
11 |
|
12 | title?: React.ReactNode | string;
|
13 |
|
14 | closable?: boolean;
|
15 |
|
16 | onOk?: (e: React.MouseEvent<HTMLElement>) => void;
|
17 |
|
18 | onCancel?: (e: React.MouseEvent<HTMLElement>) => void;
|
19 | afterClose?: () => void;
|
20 |
|
21 | centered?: boolean;
|
22 |
|
23 | width?: string | number;
|
24 |
|
25 | footer?: React.ReactNode;
|
26 |
|
27 | okText?: React.ReactNode;
|
28 |
|
29 | okType?: LegacyButtonType;
|
30 |
|
31 | cancelText?: React.ReactNode;
|
32 |
|
33 | maskClosable?: boolean;
|
34 |
|
35 | forceRender?: boolean;
|
36 | okButtonProps?: ButtonProps;
|
37 | cancelButtonProps?: ButtonProps;
|
38 | destroyOnClose?: boolean;
|
39 | style?: React.CSSProperties;
|
40 | wrapClassName?: string;
|
41 | maskTransitionName?: string;
|
42 | transitionName?: string;
|
43 | className?: string;
|
44 | getContainer?: string | HTMLElement | getContainerFunc | false | null;
|
45 | zIndex?: number;
|
46 | bodyStyle?: React.CSSProperties;
|
47 | maskStyle?: React.CSSProperties;
|
48 | mask?: boolean;
|
49 | keyboard?: boolean;
|
50 | wrapProps?: any;
|
51 | prefixCls?: string;
|
52 | closeIcon?: React.ReactNode;
|
53 | modalRender?: (node: React.ReactNode) => React.ReactNode;
|
54 | focusTriggerAfterClose?: boolean;
|
55 | }
|
56 | declare type getContainerFunc = () => HTMLElement;
|
57 | export interface ModalFuncProps {
|
58 | prefixCls?: string;
|
59 | className?: string;
|
60 | visible?: boolean;
|
61 | title?: React.ReactNode;
|
62 | closable?: boolean;
|
63 | content?: React.ReactNode;
|
64 | onOk?: (...args: any[]) => any;
|
65 | onCancel?: (...args: any[]) => any;
|
66 | afterClose?: () => void;
|
67 | okButtonProps?: ButtonProps;
|
68 | cancelButtonProps?: ButtonProps;
|
69 | centered?: boolean;
|
70 | width?: string | number;
|
71 | okText?: React.ReactNode;
|
72 | okType?: LegacyButtonType;
|
73 | cancelText?: React.ReactNode;
|
74 | icon?: React.ReactNode;
|
75 | mask?: boolean;
|
76 | maskClosable?: boolean;
|
77 | zIndex?: number;
|
78 | okCancel?: boolean;
|
79 | style?: React.CSSProperties;
|
80 | maskStyle?: React.CSSProperties;
|
81 | type?: 'info' | 'success' | 'error' | 'warn' | 'warning' | 'confirm';
|
82 | keyboard?: boolean;
|
83 | getContainer?: string | HTMLElement | getContainerFunc | false | null;
|
84 | autoFocusButton?: null | 'ok' | 'cancel';
|
85 | transitionName?: string;
|
86 | maskTransitionName?: string;
|
87 | direction?: DirectionType;
|
88 | bodyStyle?: React.CSSProperties;
|
89 | closeIcon?: React.ReactNode;
|
90 | modalRender?: (node: React.ReactNode) => React.ReactNode;
|
91 | focusTriggerAfterClose?: boolean;
|
92 | }
|
93 | export interface ModalLocale {
|
94 | okText: string;
|
95 | cancelText: string;
|
96 | justOkText: string;
|
97 | }
|
98 | interface ModalInterface extends React.FC<ModalProps> {
|
99 | useModal: typeof useModal;
|
100 | }
|
101 | declare const Modal: ModalInterface;
|
102 | export default Modal;
|