import React from "react"; import { StyledProps, Omit } from "../_type"; export interface NotificationProps extends StyledProps { /** * 类型 */ type: "success" | "warning" | "error"; /** * 通知标题 */ title?: React.ReactNode; /** * 通知内容 */ description?: React.ReactNode; /** * 标题右侧渲染内容 */ extra?: React.ReactNode; /** * 底部内容 */ footer?: React.ReactNode; /** * 底部区域点击事件 * * **当该属性不为空时底部区域将变为可点击样式** */ onFooterClick?: (event: React.MouseEvent) => void; /** * 自动关闭延时(单位毫秒) * * 设置为 0 时不自动关闭(`2.5.2` 支持) * * @default 5000 */ duration?: number; /** * 相同内容的通知同时是否只展示一份 * @default false * @since 2.5.0 */ unique?: boolean; /** * 通知关闭时回调 */ onClose?: () => void; /** * 点击通知时回调 * @since 2.4.2 */ onClick?: (event: React.MouseEvent) => void; /** * 通知关闭动画结束时回调 * @deprecated */ onExited?: () => void; } interface NotificationHandle { /** * 关闭并销毁当前对话框 */ destroy: () => void; } export interface NotificationOptions extends Omit { } export declare const notification: { success: (options: NotificationOptions) => NotificationHandle; warning: (options: NotificationOptions) => NotificationHandle; error: (options: NotificationOptions) => NotificationHandle; }; export {};