import * as React from "react"; import customize from "./customize"; import { ConfigConsumerProps } from "../Config"; export interface INotificationProps { /** * 组件包含的内容 * * @default null **/ children?: React.ReactNode; /** * 自定义组件类名 * * @default '' **/ className?: string; /** * 是否显示图标 * * @default false **/ hasIcon?: boolean; /** * 是否有内容 * * @default false **/ hasContent?: boolean; /** * 图标样式 * * @default "info" **/ iconStyle?: "info" | "success" | "warn" | "wrong"; /** * 是否自动消失 * * @default false **/ autoClose?: boolean; /** * 标题 * * @default "标题" **/ title?: React.ReactNode; /** * 描述 * * @default "" **/ content?: React.ReactNode; /** * 自动消失时间 * * @default 4500 **/ autoCloseTime?: number; /** * 关闭的回调函数 * * @default (e: any) => void **/ onClose?: (e?: any) => void; /** * 按钮默认前缀 * * @default "lg" **/ prefixCls?: string; } interface INotificationState { show: boolean; notiIn: boolean; } declare class Notification extends React.PureComponent { static defaultProps: { children: null; className: string; hasIcon: boolean; hasContent: boolean; iconStyle: string; autoClose: boolean; autoCloseTime: number; title: string; content: string; onClose: () => null; }; static customize: typeof customize; private durationTimer; constructor(props: INotificationProps); componentDidMount(): void; componentWillMount(): void; showAndClose: () => void; close: (e: any) => void; renderNotification: ({ getPrefixCls }: ConfigConsumerProps) => false | JSX.Element; render(): JSX.Element; } export default Notification;