1 | import { CSSProperties, ReactNode } from 'react';
|
2 | export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
3 | export declare type IconType = 'success' | 'info' | 'error' | 'warning';
|
4 | export interface ConfigProps {
|
5 | top?: number;
|
6 | bottom?: number;
|
7 | duration?: number;
|
8 | placement?: NotificationPlacement;
|
9 | getContainer?: () => HTMLElement;
|
10 | }
|
11 | export interface ArgsProps {
|
12 | message: ReactNode;
|
13 | description: ReactNode;
|
14 | btn?: ReactNode;
|
15 | key?: string;
|
16 | onClose?: () => void;
|
17 | duration?: number | null;
|
18 | icon?: ReactNode;
|
19 | placement?: NotificationPlacement;
|
20 | style?: CSSProperties;
|
21 | prefixCls?: string;
|
22 | className?: string;
|
23 | readonly type?: IconType;
|
24 | }
|
25 | export interface NotificationApi {
|
26 | success(args: ArgsProps): void;
|
27 | error(args: ArgsProps): void;
|
28 | info(args: ArgsProps): void;
|
29 | warn(args: ArgsProps): void;
|
30 | warning(args: ArgsProps): void;
|
31 | open(args: ArgsProps): void;
|
32 | close(key: string): void;
|
33 | config(options: ConfigProps): void;
|
34 | destroy(): void;
|
35 | }
|
36 | declare const _default: NotificationApi;
|
37 | export default _default;
|