Skip to content

Commit ec900fa

Browse files
Edit readme, bump dependencies, bump version
1 parent 4b80e1e commit ec900fa

File tree

2 files changed

+168
-81
lines changed

2 files changed

+168
-81
lines changed

README.md

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,98 @@ or
5252
Vue.use(VueIziToast, defaultOptionsObject);
5353
```
5454

55-
## Running
56-
--
55+
## Usage [![Edit Vue-Izitoast Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/8l1y3mn8rl)
56+
57+
```javascript
58+
new Vue({
59+
el: '#app',
60+
data() {
61+
return {
62+
notificationSystem: {
63+
options: {
64+
show: {
65+
theme: 'dark',
66+
icon: 'icon-person',
67+
position: 'topCenter',
68+
progressBarColor: 'rgb(0, 255, 184)',
69+
buttons: [
70+
['<button>Ok</button>', function (instance, toast) {
71+
alert("Hello world!");
72+
}, true],
73+
['<button>Close</button>', function (instance, toast) {
74+
instance.hide({
75+
transitionOut: 'fadeOutUp',
76+
onClosing: function(instance, toast, closedBy){
77+
console.info('closedBy: ' + closedBy);
78+
}
79+
}, toast, 'buttonName');
80+
}]
81+
],
82+
onOpening: function(instance, toast){
83+
console.info('callback abriu!');
84+
},
85+
onClosing: function(instance, toast, closedBy){
86+
console.info('closedBy: ' + closedBy);
87+
}
88+
},
89+
ballon: {
90+
balloon: true,
91+
position: 'bottomCenter'
92+
},
93+
info: {
94+
position: 'bottomLeft'
95+
},
96+
success: {
97+
position: 'bottomRight'
98+
},
99+
warning: {
100+
position: 'topLeft'
101+
},
102+
error: {
103+
position: 'topRight'
104+
},
105+
question: {
106+
timeout: 20000,
107+
close: false,
108+
overlay: true,
109+
toastOnce: true,
110+
id: 'question',
111+
zindex: 999,
112+
position: 'center',
113+
buttons: [
114+
['<button><b>YES</b></button>', function (instance, toast) {
115+
instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
116+
}, true],
117+
['<button>NO</button>', function (instance, toast) {
118+
instance.hide({ transitionOut: 'fadeOut' }, toast, 'button');
119+
}]
120+
],
121+
onClosing: function(instance, toast, closedBy){
122+
console.info('Closing | closedBy: ' + closedBy);
123+
},
124+
onClosed: function(instance, toast, closedBy){
125+
console.info('Closed | closedBy: ' + closedBy);
126+
}
127+
}
128+
}
129+
}
130+
};
131+
},
132+
mounted: function() {
133+
this.$toast.show('Welcome!', 'Hey', notificationSystem.options.show);
134+
this.$toast.show('Welcome!', 'Hey', notificationSystem.options.ballon);
135+
this.$toast.info('Welcome!', 'Hello', notificationSystem.options.info);
136+
this.$toast.success('Successfully inserted record!', 'OK', notificationSystem.options.success);
137+
this.$toast.warning('You forgot important data', 'Caution', notificationSystem.options.warning);
138+
this.$toast.error('Illegal operation', 'Error', notificationSystem.options.error);
139+
this.$toast.question('Are you sure about that?', 'Hey', notificationSystem.options.question);
140+
}
141+
})
142+
```
57143

58144
## Contributing
59-
--
145+
- Vue-Izitoast Issues: https://github.com/arthurvasconcelos/vue-izitoast/issues
146+
- IziToast Issues: https://github.com/dolce/iziToast/issues
60147

61148
[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)
62149

package.json

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,78 @@
1-
{
2-
"name": "vue-izitoast",
3-
"version": "1.0.0",
4-
"description": "Elegant, responsive, flexible and lightweight notification plugin implemented for Vue 2 of iziToast",
5-
"main": "dist/vue-izitoast.js",
6-
"files": [
7-
"dist/vue-izitoast.js",
8-
"dist/vue-izitoast.min.js"
9-
],
10-
"scripts": {
11-
"build": "node build/build.js"
12-
},
13-
"homepage": "https://github.comarthurvasconcelos/vue-izitoast#readme",
14-
"repository": {
15-
"type": "git",
16-
"url": "git+https://github.comarthurvasconcelos/vue-izitoast.git"
17-
},
18-
"bugs": {
19-
"url": "https://github.comarthurvasconcelos/vue-izitoast/issues"
20-
},
21-
"keywords": [
22-
"vue",
23-
"izitoast",
24-
"toaster",
25-
"toast",
26-
"message",
27-
"notification",
28-
"alert",
29-
"info,",
30-
"success",
31-
"warning",
32-
"confirm",
33-
"question",
34-
"js"
35-
],
36-
"engines": {
37-
"node": "^6.11.4 || ^8.7.0",
38-
"npm": "^3.10.10 || ^5.4.2",
39-
"yarn": "^1.0.0"
40-
},
41-
"author": "Arthur Vasconcelos <vasconcelos.arthur@gmail.com> (http://arthurvasconcelos.com.br/)",
42-
"license": "MIT",
43-
"private": false,
44-
"dependencies": {
45-
"izitoast": "dolce/iziToast#76fe906"
46-
},
47-
"peerDependencies": {
48-
"izitoast": "dolce/iziToast#76fe906",
49-
"vue": "^2.0.0"
50-
},
51-
"devDependencies": {
52-
"babel-core": "^6.26.0",
53-
"babel-eslint": "^8.2.1",
54-
"babel-loader": "^7.1.2",
55-
"babel-plugin-transform-runtime": "^6.23.0",
56-
"babel-preset-env": "^1.6.1",
57-
"babel-preset-stage-3": "^6.24.1",
58-
"chalk": "^2.3.0",
59-
"compression-webpack-plugin": "^1.1.3",
60-
"cross-env": "^5.1.3",
61-
"cross-spawn": "^6.0.3",
62-
"eslint": "^4.16.0",
63-
"eslint-friendly-formatter": "^3.0.0",
64-
"eslint-loader": "^1.9.0",
65-
"eslint-plugin-import": "^2.8.0",
66-
"friendly-errors-webpack-plugin": "^1.6.1",
67-
"ora": "^1.3.0",
68-
"rimraf": "^2.6.2",
69-
"semver": "^5.5.0",
70-
"shelljs": "^0.8.1",
71-
"uglify-es": "^3.3.9",
72-
"uglifyjs-webpack-plugin": "^1.1.6",
73-
"webpack": "^3.10.0",
74-
"webpack-bundle-analyzer": "^2.9.2",
75-
"webpack-dev-middleware": "^2.0.4",
76-
"webpack-merge": "^4.1.1"
77-
}
78-
}
1+
{
2+
"name": "vue-izitoast",
3+
"version": "1.1.0",
4+
"description": "Elegant, responsive, flexible and lightweight notification plugin implemented for Vue 2 of iziToast",
5+
"main": "dist/vue-izitoast.js",
6+
"files": [
7+
"dist/vue-izitoast.js",
8+
"dist/vue-izitoast.min.js"
9+
],
10+
"scripts": {
11+
"build": "node build/build.js"
12+
},
13+
"homepage": "https://github.com/arthurvasconcelos/vue-izitoast#readme",
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/arthurvasconcelos/vue-izitoast.git"
17+
},
18+
"bugs": {
19+
"url": "https://github.com/arthurvasconcelos/vue-izitoast/issues"
20+
},
21+
"keywords": [
22+
"vue",
23+
"izitoast",
24+
"toaster",
25+
"toast",
26+
"message",
27+
"notification",
28+
"alert",
29+
"info,",
30+
"success",
31+
"warning",
32+
"confirm",
33+
"question",
34+
"js"
35+
],
36+
"engines": {
37+
"node": "^6.11.4 || ^8.7.0",
38+
"npm": "^3.10.10 || ^5.4.2",
39+
"yarn": "^1.0.0"
40+
},
41+
"author": "Arthur Vasconcelos <vasconcelos.arthur@gmail.com> (http://arthurvasconcelos.com.br/)",
42+
"license": "MIT",
43+
"private": false,
44+
"dependencies": {
45+
"izitoast": "dolce/iziToast#76fe906"
46+
},
47+
"peerDependencies": {
48+
"izitoast": "dolce/iziToast#76fe906",
49+
"vue": "^2.0.0"
50+
},
51+
"devDependencies": {
52+
"babel-core": "^6.26.0",
53+
"babel-eslint": "^8.2.1",
54+
"babel-loader": "^7.1.2",
55+
"babel-plugin-transform-runtime": "^6.23.0",
56+
"babel-preset-env": "^1.6.1",
57+
"babel-preset-stage-3": "^6.24.1",
58+
"chalk": "^2.3.1",
59+
"compression-webpack-plugin": "^1.1.6",
60+
"cross-env": "^5.1.3",
61+
"cross-spawn": "^6.0.4",
62+
"eslint": "^4.17.0",
63+
"eslint-friendly-formatter": "^3.0.0",
64+
"eslint-loader": "^1.9.0",
65+
"eslint-plugin-import": "^2.8.0",
66+
"friendly-errors-webpack-plugin": "^1.6.1",
67+
"ora": "^1.4.0",
68+
"rimraf": "^2.6.2",
69+
"semver": "^5.5.0",
70+
"shelljs": "^0.8.1",
71+
"uglify-es": "^3.3.9",
72+
"uglifyjs-webpack-plugin": "^1.1.8",
73+
"webpack": "^3.11.0",
74+
"webpack-bundle-analyzer": "^2.10.0",
75+
"webpack-dev-middleware": "^2.0.5",
76+
"webpack-merge": "^4.1.1"
77+
}
78+
}

0 commit comments

Comments
 (0)