Now supports

* type arguments,
* positional parameters and
* html as content
* Documentation updates
This commit is contained in:
Indrajith K L
2017-12-19 14:21:29 +05:30
parent ab0d224a29
commit c0eb82f55a
36 changed files with 1192 additions and 60 deletions

BIN
example/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

17
example/example.html Normal file
View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vanilla Yo Notification</title>
</head>
<body>
<button onclick="showNotificationSuccess()">Show Success Notification</button>
<button onclick="showNotificationWarning()">Show Warning Notification</button>
<button onclick="showNotificationError()">Show Error Notification</button>
<script src="../dist/vanilla-yo-notification.js"></script>
<script src="./example.js"></script>
</body>
</html>

38
example/example.js Normal file
View File

@@ -0,0 +1,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);