-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeclaration.d.ts
More file actions
95 lines (85 loc) · 2.77 KB
/
declaration.d.ts
File metadata and controls
95 lines (85 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
declare module "styled-components";
declare module "aos";
declare module "react-fast-marquee";
declare module "react-loader-spinner";
declare module "react-notifications" {
import { ReactNode } from "react";
import { EventEmitter } from "events";
enum NotificationType {
INFO = "info",
SUCCESS = "success",
WARNING = "warning",
ERROR = "error",
}
enum EventType {
CHANGE = "change",
INFO = "info",
SUCCESS = "success",
WARNING = "warning",
ERROR = "error",
}
interface NotificationProps {
type: NotificationType;
title?: ReactNode;
message: ReactNode;
timeOut?: number;
onClick: () => any;
onRequestHide: () => any;
}
interface NotificationsProps {
notifications: Notification[];
onRequestHide?: (notification: Notification) => any;
enterTimeout?: number;
leaveTimeout?: number;
}
interface NotificationContainerProps {
enterTimeout?: number;
leaveTimeout?: number;
}
interface INotificationManagerCreate {
type: EventType;
title?: NotificationProps["title"];
message?: NotificationProps["message"];
timeout?: number;
onClick?: () => any;
priority?: boolean;
}
class Notification extends React.Component<NotificationProps, {}> { }
class Notifications extends React.Component<NotificationsProps, {}> { }
class NotificationContainer extends React.Component<
NotificationContainerProps,
{}
> { }
class NotificationManager extends EventEmitter {
static create(INotificationManagerCreate): void;
static info(
message?: INotificationManagerCreate["message"],
title?: INotificationManagerCreate["title"],
timeOut?: INotificationManagerCreate["timeout"],
onClick?: INotificationManagerCreate["onClick"],
priority?: INotificationManagerCreate["priority"]
): void;
static success(
message?: INotificationManagerCreate["message"],
title?: INotificationManagerCreate["title"],
timeOut?: INotificationManagerCreate["timeout"],
onClick?: INotificationManagerCreate["onClick"],
priority?: INotificationManagerCreate["priority"]
): void;
static warning(
message?: INotificationManagerCreate["message"],
title?: INotificationManagerCreate["title"],
timeOut?: INotificationManagerCreate["timeout"],
onClick?: INotificationManagerCreate["onClick"],
priority?: INotificationManagerCreate["priority"]
): void;
static error(
message?: INotificationManagerCreate["message"],
title?: INotificationManagerCreate["title"],
timeOut?: INotificationManagerCreate["timeout"],
onClick?: INotificationManagerCreate["onClick"],
priority?: INotificationManagerCreate["priority"]
): void;
static remove(notification: Notification): void;
}
}