1 | import type React from 'react';
|
2 | export type Placement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
3 | type NoticeSemanticProps = 'wrapper';
|
4 | export interface NoticeConfig {
|
5 | content?: React.ReactNode;
|
6 | duration?: number | null;
|
7 | showProgress?: boolean;
|
8 | pauseOnHover?: boolean;
|
9 | closeIcon?: React.ReactNode;
|
10 | closable?: boolean | ({
|
11 | closeIcon?: React.ReactNode;
|
12 | } & React.AriaAttributes);
|
13 | className?: string;
|
14 | style?: React.CSSProperties;
|
15 | classNames?: {
|
16 | [key in NoticeSemanticProps]?: string;
|
17 | };
|
18 | styles?: {
|
19 | [key in NoticeSemanticProps]?: React.CSSProperties;
|
20 | };
|
21 |
|
22 | props?: React.HTMLAttributes<HTMLDivElement> & Record<string, any>;
|
23 | onClose?: VoidFunction;
|
24 | onClick?: React.MouseEventHandler<HTMLDivElement>;
|
25 | }
|
26 | export interface OpenConfig extends NoticeConfig {
|
27 | key: React.Key;
|
28 | placement?: Placement;
|
29 | content?: React.ReactNode;
|
30 | duration?: number | null;
|
31 | }
|
32 | export type InnerOpenConfig = OpenConfig & {
|
33 | times?: number;
|
34 | };
|
35 | export type Placements = Partial<Record<Placement, OpenConfig[]>>;
|
36 | export type StackConfig = boolean | {
|
37 | |
38 |
|
39 |
|
40 |
|
41 | threshold?: number;
|
42 | |
43 |
|
44 |
|
45 |
|
46 | offset?: number;
|
47 | |
48 |
|
49 |
|
50 | gap?: number;
|
51 | };
|
52 | export {};
|