From 9b608b89b16953c8d717ed8fde02ae396eea6094 Mon Sep 17 00:00:00 2001
From: Indrajith K L
Date: Tue, 19 Dec 2017 19:10:01 +0530
Subject: * Webpack config changes * Updated documentation with example *
removed unwanted dependencies from starter pack
---
docs/README.md | 2 ++
docs/example/64x64.png | Bin 0 -> 206 bytes
docs/example/example.html | 23 +++++++++++++++++
docs/example/example.js | 38 ++++++++++++++++++++++++++++
docs/example/vanilla-yo-notification.js | 2 ++
docs/example/vanilla-yo-notification.js.map | 1 +
docs/index.html | 2 +-
7 files changed, 67 insertions(+), 1 deletion(-)
create mode 100644 docs/example/64x64.png
create mode 100644 docs/example/example.html
create mode 100644 docs/example/example.js
create mode 100644 docs/example/vanilla-yo-notification.js
create mode 100644 docs/example/vanilla-yo-notification.js.map
(limited to 'docs')
diff --git a/docs/README.md b/docs/README.md
index a9c706e..ad120ac 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -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://az743702.vo.msecnd.net/cdn/kofi2.png?v=0)](https://ko-fi.com/R6R36EBQ)
\ No newline at end of file
diff --git a/docs/example/64x64.png b/docs/example/64x64.png
new file mode 100644
index 0000000..d889069
Binary files /dev/null and b/docs/example/64x64.png differ
diff --git a/docs/example/example.html b/docs/example/example.html
new file mode 100644
index 0000000..4335544
--- /dev/null
+++ b/docs/example/example.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+ Vanilla Yo Notification
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/example/example.js b/docs/example/example.js
new file mode 100644
index 0000000..a0b53fa
--- /dev/null
+++ b/docs/example/example.js
@@ -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: 'This is a content',
+ type: 'warning',
+ timeout: 1000
+ });
+ }
+ window.showNotificationError = function(){
+
+ notif.show({
+ title: 'Notification Title',
+ content: 'This is a content with image ',
+ type: 'error',
+ timeout: 2000
+ });
+ }
+
+
+
+
+})(window);
\ No newline at end of file
diff --git a/docs/example/vanilla-yo-notification.js b/docs/example/vanilla-yo-notification.js
new file mode 100644
index 0000000..ec7e447
--- /dev/null
+++ b/docs/example/vanilla-yo-notification.js
@@ -0,0 +1,2 @@
+!function(t){function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e(1);window.VYN=o.default},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e(2);var o=function(){function t(t){this.defaultConfig={content:t.content?t.content:"",footer:t.footer?t.footer:"",timeout:t.timeout?t.timeout:3e3,title:t.title?t.title:"",type:t.type?t.type:"success",position:t.position&&2==t.position.length?t.position:["bottom","right"]},this.init()}return t.prototype.init=function(){this.buildContainers()},t.prototype.buildContainers=function(){this.container=document.createElement("div"),this.container.className="notif-mainContainer "+this.defaultConfig.position.join("-"),this.notifInner=document.createElement("div"),this.notifInner.className="notif-inner",this.container.appendChild(this.notifInner),document.body.appendChild(this.container)},t.prototype.show=function(t){var n=this,e=document.createElement("div");e.className="vanilla-yo-notification "+(t.type?t.type:this.defaultConfig.type),this.notificationTemplate='\n