A notification system based on blueprintjs toasters and the myths redux framework
npm install @nteract/mythic-notificationsThis package implements a notification system based on blueprintjs, using the myths framework.
```
$ yarn add @nteract/mythic-notifications
``
$ npm install --save @nteract/mythic-notifications
Initialize the package by including the notifications package in your store and rendering the :
`javascript
import { notifications, NotificationRoot } from "@nteract/mythic-notifications";
import { makeConfigureStore } from "@nteract/myths";
export const configureStore = makeConfigureStore({
packages: [notifications],
});
export const App = () =>
<>
{/ ... /}
>
`
Then dispatch actions made by sendNotification.create:
`javascript
import { sendNotification } from "@nteract/mythic-notifications";
store.dispatch(sendNotification.create({
title: "Hello World!",
message: Hi out there!,
level: "info",
}));
`
`typescript
import { IconName } from "@blueprintjs/core";
export interface NotificationMessage {
key?: string;
icon?: IconName;
title?: string;
message: string | JSX.Element;
level: "error" | "warning" | "info" | "success" | "in-progress";
action?: {
icon?: IconName;
label: string;
callback: () => void;
};
}
`
If you experience an issue while using this package or have a feature request, please file an issue on the issue board and add the pkg:mythic-notifications` label.