UNPKG

1.53 kBJavaScriptView Raw
1(function (global, factory) {
2 if (typeof define === "function" && define.amd) {
3 define(['module'], factory);
4 } else if (typeof exports !== "undefined") {
5 factory(module);
6 } else {
7 var mod = {
8 exports: {}
9 };
10 factory(mod);
11 global.notificationConfig = mod.exports;
12 }
13})(this, function (module) {
14 'use strict';
15
16 var items = [{
17 type: 'error',
18 title: 'Notification title',
19 subtitle: 'Subtitle text goes here.',
20 timestamp: 'Time stamp [00:00:00]'
21 }, {
22 type: 'info',
23 title: 'Notification title',
24 subtitle: 'Subtitle text goes here.',
25 timestamp: 'Time stamp [00:00:00]'
26 }, {
27 type: 'success',
28 title: 'Notification title',
29 subtitle: 'Subtitle text goes here.',
30 timestamp: 'Time stamp [00:00:00]'
31 }, {
32 type: 'warning',
33 title: 'Notification title',
34 subtitle: 'Subtitle text goes here.',
35 timestamp: 'Time stamp [00:00:00]'
36 }];
37
38 module.exports = {
39 variants: [{
40 name: 'default',
41 label: 'Inline Notification',
42 context: {
43 variant: 'inline',
44 items: items
45 }
46 }, {
47 name: 'toast',
48 label: 'Toast Notification',
49 notes: '\n Toast notifications are typically passive, meaning they won\'t affect the user\'s workflow if not addressed.\n Toast Notifications use \'kind\' props to specify the kind of notification that should render (error, info, success, warning).\n ',
50 context: {
51 variant: 'toast',
52 items: items
53 }
54 }]
55 };
56});
\No newline at end of file