JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 67
  • Score
    100M100P100Q84384F
  • License BSD-3-Clause

Integrate 'react-toastify' nicely in JupyterLab.

Package Exports

  • jupyterlab_toastify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jupyterlab_toastify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

jupyterlab_toastify

Integrate 'react-toastify' nicely in JupyterLab.

example

Usage

import { INotification } from "jupyterlab_toastify";

// Error message notification - do not close automatically
INotification.error("Error");
// Warning message notification - do not close automatically
INotification.warning("Warning");
// Info message notification
INotification.info("Info");
// Success message notification
INotification.success("Success");

// Background task with progression animation
let id = INotification.inProgress("Task in progress!");
// -> Update text
INotification.update(id, "Updating task...");
// -> Update text, status and set closing delay (in ms)
INotification.update(id, "Task succeed", "success", 3000);

// Default call using `toast` function
// This is the only helper function taking two arguments: content and options.
// See https://github.com/fkhadra/react-toastify#usage
INotification.notify("Default");

To close a notification, click on it.

Prerequisites

Installation

jupyter labextension install jupyterlab_toastify

Development

For a development install (requires npm version 4 or later), do the following in the repository directory:

npm install
npm run build
jupyter labextension install .

To rebuild the package and the JupyterLab app:

npm run build
jupyter lab build