UNPKG

widely

Version:
60 lines (59 loc) 2 kB
import * as React from 'react'; import useModal from 'antd/lib/modal/useModal'; import { LegacyButtonType, ButtonProps } from 'antd/lib/button/button'; import { DirectionType } from 'antd/lib/config-provider'; import "antd/lib/modal/style/index"; import "./style/index.less"; export declare const destroyFns: Array<() => void>; export interface ModalProps { /** 对话框是否可见 */ [propName: string]: any; } 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; height?: 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; } export interface ModalLocale { okText: string; cancelText: string; justOkText: string; } interface ModalInterface extends React.FC<ModalProps> { useModal: typeof useModal; } declare const Modal: ModalInterface; export default Modal;