* Webpack config changes
* Updated documentation with example * removed unwanted dependencies from starter pack
This commit is contained in:
@@ -79,6 +79,8 @@ position filed expects an array of two values. This determines where the notific
|
||||
number filed is the one which determines how much time notification should be visible. It expects time in **milliseconds**. Default value is *6000ms(6s)*
|
||||
|
||||
|
||||
#### [example](http://libvyn.indrajith.surge.sh/example/example.html)
|
||||
|
||||
### Support ME
|
||||
|
||||
[](https://ko-fi.com/R6R36EBQ)
|
||||
BIN
docs/example/64x64.png
Normal file
BIN
docs/example/64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 206 B |
23
docs/example/example.html
Normal file
23
docs/example/example.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!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>
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
||||
<link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css">
|
||||
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<button class="button" onclick="showNotificationSuccess()">Show Success Notification</button>
|
||||
<button class="button" onclick="showNotificationWarning()">Show Warning Notification</button>
|
||||
<button class="button" onclick="showNotificationError()">Show Error Notification</button>
|
||||
|
||||
<script src="./vanilla-yo-notification.js"></script>
|
||||
<script src="./example.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
38
docs/example/example.js
Normal file
38
docs/example/example.js
Normal file
@@ -0,0 +1,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);
|
||||
2
docs/example/vanilla-yo-notification.js
Normal file
2
docs/example/vanilla-yo-notification.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/example/vanilla-yo-notification.js.map
Normal file
1
docs/example/vanilla-yo-notification.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: 'vanilla-yo-notification',
|
||||
repo: ''
|
||||
repo: 'https://github.com/cooljith91112/vanilla-yo-notification'
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user