import { FunctionComponent } from 'react'; import { BasicComponent } from '../../utils/typings'; export type NotifyPosition = 'top' | 'bottom'; export type NotifyType = 'primary' | 'success' | 'danger' | 'warning'; export interface NotifyProps extends BasicComponent { id?: string; /** * 展示时长(ms),值为 0 时,notify 不会消失 * @default 3000 */ duration: number /** * 提示的信息类型(primary,success ,danger,warning) * @default danger */ type: NotifyType /** * 自定义位置 (top, bottom) * @default top */ position: NotifyPosition /** * 消息框是否展示 * @default false */ visible: boolean /** * 关闭事件回调 * @default - */ onClose: () => void /** * 点击事件回调 * @default - */ onClick: () => void } export declare const Notify: FunctionComponent> & { open: typeof open; close: typeof close; }; export declare function open(selector: string): void; export declare function close(selector: string): void;