Files
vanilla-yo-notification/example/example.js
Indrajith K L c0eb82f55a Now supports
* type arguments,
* positional parameters and
* html as content
* Documentation updates
2017-12-19 14:21:29 +05:30

38 lines
903 B
JavaScript

(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);