@nteract/mythic-notifications
Version:
A notification system based on blueprintjs toasters and the myths redux framework
12 lines (10 loc) • 410 B
text/typescript
import { NotificationMessage, NotificationSystem } from "../types";
export const consoleNotificationSystem: NotificationSystem = {
addNotification: (msg: NotificationMessage) => {
switch (msg.level) {
case "error": console.error (msg.title, msg); break;
case "warning": console.warn (msg.title, msg); break;
default: console.log (msg.title, msg); break;
}
}
};