UNPKG

987 BTypeScriptView Raw
1import * as React from 'react';
2import type { ReactElement } from 'react';
3import type { CSSMotionProps } from 'rc-motion';
4import type { OpenConfig, Placement, StackConfig } from './interface';
5export interface NotificationsProps {
6 prefixCls?: string;
7 motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);
8 container?: HTMLElement | ShadowRoot;
9 maxCount?: number;
10 className?: (placement: Placement) => string;
11 style?: (placement: Placement) => React.CSSProperties;
12 onAllRemoved?: VoidFunction;
13 stack?: StackConfig;
14 renderNotifications?: (node: ReactElement, info: {
15 prefixCls: string;
16 key: React.Key;
17 }) => ReactElement;
18}
19export interface NotificationsRef {
20 open: (config: OpenConfig) => void;
21 close: (key: React.Key) => void;
22 destroy: () => void;
23}
24declare const Notifications: React.ForwardRefExoticComponent<NotificationsProps & React.RefAttributes<NotificationsRef>>;
25export default Notifications;