import React, { PropsWithChildren, ReactNode, CSSProperties } from "react"; export interface ModalType { /** 父组件用来控制的状态 */ visible: boolean; /** 容器位置 */ container?: Element; /** 父组件用来改变显示状态的setState*/ setState: React.Dispatch>; /** 弹出框标题 */ title?: ReactNode; /** 是否有确认按钮 */ confirm?: boolean; /** 改变确认按钮文本*/ okText?: string; /** 改变取消按钮文本*/ cancelText?: string; /** 点了确认的回调,如果传了,需要自行处理关闭 */ onOk?: () => void; /** 点了取消的回调,如果传了,需要自行处理关闭*/ onCancel?: () => void; /** 点确认或者取消都会走的回调 */ callback?: (v: boolean) => void; /** 点击mask是否关闭模态框 */ maskClose?: boolean; /** 是否有mask */ mask?: boolean; /** 自定义模态框位置 */ style?: CSSProperties; /** 是否有右上角关闭按钮 */ closeButton?: boolean; /** 动画时间 */ delay?: number; /** 额外类名 */ className?: string; /** 是否停止滚动*/ stopScroll?: boolean; /** portralstyle*/ portralStyle?: CSSProperties; /** 默认确认按钮大小 */ btnSize?: "default" | "sm" | "lg"; /** portral的回调 */ refCallback?: (ref: HTMLDivElement) => void; /** 没点确认于取消,直接关闭的回调 */ closeCallback?: () => void; } declare function Modal(props: PropsWithChildren): JSX.Element; declare namespace Modal { var defaultProps: { visible: boolean; container: HTMLElement; confirm: boolean; title: string; maskClose: boolean; mask: boolean; closeButton: boolean; delay: number; stopScroll: boolean; btnSize: string; }; } export default Modal;