import type { CLASSES } from './vars'; import type { ButtonProps } from '../button'; import type { BaseProps } from '../types'; export {}; export interface ModalProps extends BaseProps<'modal', typeof CLASSES>, React.HTMLAttributes { visible: boolean; header?: React.ReactElement | string; footer?: React.ReactElement; alert?: React.ReactElement; width?: number | string; top?: number | string; mask?: boolean; maskClosable?: boolean; escClosable?: boolean; skipFirstTransition?: boolean; destroyAfterClose?: boolean; lazyLoading?: boolean; zIndex?: number | string; onClose?: () => void; afterVisibleChange?: (visible: boolean) => void; } export interface ModalHeaderProps extends BaseProps<'modal', typeof CLASSES>, React.HTMLAttributes { actions?: (React.ReactNode | { id: React.Key; action: React.ReactNode; })[]; closeProps?: ButtonProps; onCloseClick?: () => any | Promise; } export interface ModalFooterProps extends BaseProps<'modal', typeof CLASSES>, Omit, 'children'> { align?: 'left' | 'center' | 'right'; actions?: (React.ReactNode | { id: React.Key; action: React.ReactNode; })[]; cancelProps?: ButtonProps; okProps?: ButtonProps; onCancelClick?: () => any | Promise; onOkClick?: () => any | Promise; } export interface ModalAlertProps extends BaseProps<'modal', typeof CLASSES>, Omit, 'title'> { type: 'success' | 'warning' | 'error' | 'info'; title?: React.ReactNode; icon?: React.ReactNode; }