Skip to content

Commit 6732532

Browse files
committed
fix type default
1 parent f7b5a65 commit 6732532

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ppeerit-react-toast",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "toast for reactjs",
55
"main": "bin/index.js",
66
"scripts": {

src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const duration = 500
55
// default options
66
export let options = {
77
timeout: 3000,
8-
position: 'top',
8+
position: 'default',
99
backgroundColor: null,
1010
textColor: null
1111
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function umountToast() {
159159
}
160160

161161
// show animated toast
162-
function show(text, type, config) {
162+
function show(text, type = 'info', config = {}) {
163163
let newConfig = assign({}, options, config)
164164
if (!document.getElementById(wrapper).hasChildNodes()) {
165165
// mount toast

0 commit comments

Comments
 (0)