/** * * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc.. * * This source code is licensed under the Apache license. * See LICENSE file in the project root for license information. * */ import * as React from 'react'; import useModal from './useModal'; import { LegacyButtonType, ButtonProps } from '../../button/component/button'; import { DirectionType } from '../../config-provider'; import { WrapThrottleOptions } from '../../_util/wrapThrottle'; export declare const destroyFns: Array<() => void>; export interface ModalProps { visible?: boolean; confirmLoading?: boolean; title?: React.ReactNode | string; closable?: boolean; onOk?: (e: React.MouseEvent) => void; onCancel?: (e: React.MouseEvent) => void; afterClose?: () => void; centered?: boolean; width?: string | number; footer?: React.ReactNode; okText?: React.ReactNode; okType?: LegacyButtonType; cancelText?: React.ReactNode; maskClosable?: boolean; forceRender?: boolean; okButtonProps?: ButtonProps; cancelButtonProps?: ButtonProps; destroyOnClose?: boolean; style?: React.CSSProperties; wrapClassName?: string; maskTransitionName?: string; transitionName?: string; className?: string; getContainer?: string | HTMLElement | getContainerFunc | false | null; zIndex?: number; bodyStyle?: React.CSSProperties; maskStyle?: React.CSSProperties; mask?: boolean; keyboard?: boolean; wrapProps?: any; prefixCls?: string; closeIcon?: React.ReactNode; modalRender?: (node: React.ReactNode) => React.ReactNode; focusTriggerAfterClose?: boolean; okThrottle?: WrapThrottleOptions; okDebounce?: WrapThrottleOptions; } declare type getContainerFunc = () => HTMLElement; export interface ModalFuncProps { prefixCls?: string; className?: string; visible?: boolean; title?: React.ReactNode; closable?: boolean; content?: React.ReactNode; onOk?: (...args: any[]) => any; onCancel?: (...args: any[]) => any; afterClose?: () => void; okButtonProps?: ButtonProps; cancelButtonProps?: ButtonProps; centered?: boolean; width?: string | number; okText?: React.ReactNode; okType?: LegacyButtonType; cancelText?: React.ReactNode; icon?: React.ReactNode; mask?: boolean; maskClosable?: boolean; zIndex?: number; okCancel?: boolean; style?: React.CSSProperties; maskStyle?: React.CSSProperties; type?: 'info' | 'success' | 'error' | 'warn' | 'warning' | 'confirm'; keyboard?: boolean; getContainer?: string | HTMLElement | getContainerFunc | false | null; autoFocusButton?: null | 'ok' | 'cancel'; transitionName?: string; maskTransitionName?: string; direction?: DirectionType; bodyStyle?: React.CSSProperties; closeIcon?: React.ReactNode; modalRender?: (node: React.ReactNode) => React.ReactNode; focusTriggerAfterClose?: boolean; img?: string; isShowBody?: boolean; closableForBottom?: boolean; footer?: React.ReactNode; } export interface ModalLocale { okText: string; cancelText: string; justOkText: string; } interface ModalInterface extends React.FC { useModal: typeof useModal; } declare const Modal: ModalInterface; export default Modal;