11# jupyterlab_toastify
22
3- Integrate ' react-toastify' nicely in JupyterLab.
3+ Integrate [ ` react-toastify ` ] ( https://github.com/fkhadra/react-toastify ) nicely in JupyterLab.
44
55![ example] ( jupyterlab_notifications.gif )
66
@@ -19,7 +19,7 @@ INotification.info("Info");
1919INotification .success (" Success" );
2020
2121// Background task with progression animation
22- let id = INotification .inProgress (" Task in progress!" );
22+ let id = await INotification .inProgress (" Task in progress!" );
2323// -> Update text
2424INotification .update ({
2525 toastId: id,
@@ -54,26 +54,40 @@ INotification.dismiss(id);
5454INotification .dismiss ();
5555
5656// Default call using `toast` function
57- // See https://github.com/fkhadra/react-toastify#usage
57+ // See https://github.com/fkhadra/react-toastify
5858INotification .notify (" Default" );
5959```
6060
6161To close a notification, click on the close button.
6262
6363## Prerequisites
6464
65- - [ JupyterLab] ( https://github.com/jupyterlab/jupyterlab/ ) 1.0
66- - [ react] ( https://reactjs.org/ ) 0.16
67- - [ react-toastify] ( https://github.com/fkhadra/react-toastify ) 4.4
65+ - [ react] ( https://reactjs.org/ ) ^16.0
66+ - [ react-toastify] ( https://github.com/fkhadra/react-toastify ) ^6.0
6867
6968## Installation
7069
71- ``` bash
72- jupyter labextension install jupyterlab_toastify
73- ```
70+ This is a pure NPM package since v4. You don't need to install a JupyterLab extension.
71+
72+ The toast container will be added to the DOM automatically by ` react-toastify ` .
73+
74+ > All functions are asynchronous as ` react-toastify ` is lazy loaded if required.
7475
7576## Changelog
7677
78+ ### v4.0.0
79+
80+ - Features
81+ - ` react-toastify ` v5 introduces the ability to add the toast container automatically.
82+ This extension uses that ability to remove the need of having a dedicated JupyterLab extension
83+ to be installed by users.
84+ - Lazy load ` react-toastify ` => all functions are asynchronous
85+ - Bump to ` react-toastify ` v6
86+
87+ ### v3.0.0
88+
89+ Port to JupyterLab v2
90+
7791### v2.3.1
7892
7993- BUG ` INotification.warning ` does not accept options.
0 commit comments