1 | import type { CSSMotionProps } from 'rc-motion';
|
2 | import * as React from 'react';
|
3 | import type { OpenConfig, Placement } from './Notifications';
|
4 | type OptionalConfig = Partial<OpenConfig>;
|
5 | export interface NotificationConfig {
|
6 | prefixCls?: string;
|
7 |
|
8 | getContainer?: () => HTMLElement | ShadowRoot;
|
9 | motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);
|
10 | closeIcon?: React.ReactNode;
|
11 | closable?: boolean;
|
12 | maxCount?: number;
|
13 | duration?: number;
|
14 | /** @private. Config for notification holder style. Safe to remove if refactor */
|
15 | className?: (placement: Placement) => string;
|
16 |
|
17 | style?: (placement: Placement) => React.CSSProperties;
|
18 |
|
19 | onAllRemoved?: VoidFunction;
|
20 | }
|
21 | export interface NotificationAPI {
|
22 | open: (config: OptionalConfig) => void;
|
23 | close: (key: React.Key) => void;
|
24 | destroy: () => void;
|
25 | }
|
26 | export default function useNotification(rootConfig?: NotificationConfig): [NotificationAPI, React.ReactElement];
|
27 | export {};
|