@omniumretail/component-library 1.2.19 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,9 +2,12 @@ import { ArgsProps } from 'antd/lib/notification';
|
|
|
2
2
|
export interface ErrorNotificationProps extends ArgsProps {
|
|
3
3
|
message: string;
|
|
4
4
|
description: string;
|
|
5
|
+
duration?: number;
|
|
6
|
+
showProgress?: boolean;
|
|
7
|
+
pauseOnHover?: boolean;
|
|
5
8
|
}
|
|
6
9
|
type NotificationType = 'success' | 'info' | 'warning' | 'error';
|
|
7
|
-
export declare const Notification: ({ message, description }: ErrorNotificationProps) => {
|
|
10
|
+
export declare const Notification: ({ message, description, duration, showProgress, pauseOnHover }: ErrorNotificationProps) => {
|
|
8
11
|
openNotificationWithIcon: (type: NotificationType) => void;
|
|
9
12
|
};
|
|
10
13
|
export {};
|
package/package.json
CHANGED
|
@@ -4,15 +4,21 @@ import { ArgsProps } from 'antd/lib/notification';
|
|
|
4
4
|
export interface ErrorNotificationProps extends ArgsProps {
|
|
5
5
|
message: string;
|
|
6
6
|
description: string;
|
|
7
|
+
duration?: number;
|
|
8
|
+
showProgress?: boolean;
|
|
9
|
+
pauseOnHover?: boolean;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
type NotificationType = 'success' | 'info' | 'warning' | 'error';
|
|
10
13
|
|
|
11
|
-
export const Notification = ({ message, description }: ErrorNotificationProps) => {
|
|
14
|
+
export const Notification = ({ message, description, duration, showProgress, pauseOnHover }: ErrorNotificationProps) => {
|
|
12
15
|
const openNotificationWithIcon = (type: NotificationType) => {
|
|
13
16
|
notification[type]({
|
|
14
17
|
message: message,
|
|
15
18
|
description: description,
|
|
19
|
+
duration: duration || 5,
|
|
20
|
+
showProgress: showProgress || false,
|
|
21
|
+
pauseOnHover: pauseOnHover || false
|
|
16
22
|
});
|
|
17
23
|
};
|
|
18
24
|
|