aboutsummaryrefslogtreecommitdiff
path: root/docs/example/example.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/example/example.js')
-rw-r--r--docs/example/example.js38
1 files changed, 38 insertions, 0 deletions
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: '<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); \ No newline at end of file