@@ -19,42 +19,42 @@ jlpm add jupyterlab_toastify
19
19
## Usage
20
20
21
21
``` javascript
22
- import { INotification } from " jupyterlab_toastify" ;
22
+ import { INotification } from ' jupyterlab_toastify' ;
23
23
24
24
// Error message notification - do not close automatically
25
- INotification .error (" Error" );
25
+ INotification .error (' Error' );
26
26
// Warning message notification - do not close automatically
27
- INotification .warning (" Warning" );
27
+ INotification .warning (' Warning' );
28
28
// Info message notification
29
- INotification .info (" Info" );
29
+ INotification .info (' Info' );
30
30
// Success message notification
31
- INotification .success (" Success" );
31
+ INotification .success (' Success' );
32
32
33
33
// Background task with progression animation
34
- let id = await INotification .inProgress (" Task in progress!" );
34
+ let id = await INotification .inProgress (' Task in progress!' );
35
35
// -> Update text
36
36
INotification .update ({
37
37
toastId: id,
38
- message: " Updating task..."
38
+ message: ' Updating task...'
39
39
});
40
40
// -> Update text, status and set closing delay (in ms)
41
41
INotification .update ({
42
42
toastId: id,
43
- message: " Task succeed" ,
44
- type: " success" ,
43
+ message: ' Task succeed' ,
44
+ type: ' success' ,
45
45
autoClose: 3000
46
46
});
47
47
48
48
// Notification with two buttons
49
- INotification .error (" Error with button" , {
49
+ INotification .error (' Error with button' , {
50
50
buttons: [
51
51
{
52
- label: " Action1" ,
53
- callback : () => alert (" Action1 was clicked" )
52
+ label: ' Action1' ,
53
+ callback : () => alert (' Action1 was clicked' )
54
54
},
55
55
{
56
- label: " Action2" ,
57
- callback : () => alert (" Action2 was clicked" )
56
+ label: ' Action2' ,
57
+ callback : () => alert (' Action2 was clicked' )
58
58
}
59
59
]
60
60
});
@@ -67,15 +67,15 @@ INotification.dismiss();
67
67
68
68
// Default call using `toast` function
69
69
// See https://github.com/fkhadra/react-toastify
70
- INotification .notify (" Default" );
70
+ INotification .notify (' Default' );
71
71
```
72
72
73
73
To close a notification, click on the close button.
74
74
75
75
## Prerequisites
76
76
77
77
- [ react] ( https://reactjs.org/ ) ^16.0 || ^17.0
78
- - [ react-toastify] ( https://github.com/fkhadra/react-toastify ) ^6 .0
78
+ - [ react-toastify] ( https://github.com/fkhadra/react-toastify ) ^7 .0
79
79
80
80
## Installation
81
81
@@ -87,6 +87,18 @@ The toast container will be added to the DOM automatically by `react-toastify`.
87
87
88
88
## Changelog
89
89
90
+ ### v4.2.0
91
+
92
+ - Update to [ ` react-toastify ` v7] ( https://github.com/fkhadra/react-toastify/releases/tag/v7.0.0 )
93
+ - Security updates:
94
+ - Bump ini from 1.3.5 to 1.3.8 (#14 )
95
+ - Bump ssri from 8.0.0 to 8.0.1 (#15 )
96
+ - Bump hosted-git-info from 2.8.8 to 2.8.9 (#16 )
97
+ - Bump lodash from 4.17.20 to 4.17.21 (#17 )
98
+ - Bump ws from 7.4.5 to 7.4.6 (#19 )
99
+ - Bump normalize-url from 4.5.0 to 4.5.1 (#20 )
100
+ - Bump tar from 6.1.0 to 6.1.5 (#21 )
101
+
90
102
### v4.1.2
91
103
92
104
- New feature:
0 commit comments