blob: 4500c703836be732d06e09a9eb1672a327191f60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
(function(window){
var notif = new VanillaYoNotification({
position: ['bottom', 'left']
});
var counter = 0;
window.showNotificationSuccess = function(){
notif.show({
title: 'Notification Title',
content: `This is a content ${counter}`,
timeout: 6000
});
counter += 1;
}
window.showNotificationWarning = function(){
notif.show({
title: 'Notification Title',
content: '<b>This is a content</b>',
type: 'warning',
timeout: 1000
});
}
window.showNotificationError = function(){
notif.show({
title: 'Notification Title',
content: 'This is a content with image <img src="64x64.png"/>',
type: 'error',
timeout: 2000
});
}
})(window);
|