aboutsummaryrefslogtreecommitdiff
path: root/docs/example/example.js
blob: a0b53fac89318f77825f15dad5436e18ad4ca468 (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 VYN({
        position: ['bottom', 'right']
    });
    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);