1 | import * as React from 'react';
|
2 | import type { CSSMotionProps } from 'rc-motion';
|
3 | import type { NoticeConfig } from './Notice';
|
4 | export interface OpenConfig extends NoticeConfig {
|
5 | key: React.Key;
|
6 | placement?: Placement;
|
7 | content?: React.ReactNode;
|
8 | duration?: number | null;
|
9 | }
|
10 | export interface NotificationsProps {
|
11 | prefixCls?: string;
|
12 | motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);
|
13 | container?: HTMLElement | ShadowRoot;
|
14 | maxCount?: number;
|
15 | className?: (placement: Placement) => string;
|
16 | style?: (placement: Placement) => React.CSSProperties;
|
17 | onAllRemoved?: VoidFunction;
|
18 | }
|
19 | export type Placement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
20 | export interface NotificationsRef {
|
21 | open: (config: OpenConfig) => void;
|
22 | close: (key: React.Key) => void;
|
23 | destroy: () => void;
|
24 | }
|
25 | declare const Notifications: React.ForwardRefExoticComponent<NotificationsProps & React.RefAttributes<NotificationsRef>>;
|
26 | export default Notifications;
|