react-native-popup-confirm-toast
Advanced tools
Comparing version
{ | ||
"name": "react-native-popup-confirm-toast", | ||
"version": "2.2.9", | ||
"version": "2.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,3 +12,3 @@ # react-native-popup-confirm-toast | ||
- Toast bugfix | ||
- Toast (event = onOpen,onClose) | ||
@@ -303,4 +303,6 @@ ## Example Bottom Sheet | ||
| `startDuration` | number | | 200 ms | | ||
| `onOpenComplete` | function | works after the window is opened | false | | ||
| `onCloseComplete` | function | works after window is closed | false | | ||
| `onOpen` | function | works after the window is opened | null | | ||
| `onOpenComplete` | function | works after the window is opened | null | | ||
| `onClose` | function | works after window is closed | null | | ||
| `onCloseComplete` | function | works after window is closed | null | | ||
@@ -307,0 +309,0 @@ ### Methods |
@@ -33,4 +33,6 @@ import React, {Component} from 'react'; | ||
startDuration: 200, | ||
onOpen: false, | ||
onOpenComplete: false, | ||
onClose: false, | ||
onCloseComplete: false, | ||
onOpenComplete: false, | ||
starting: false, | ||
@@ -81,4 +83,4 @@ }; | ||
}, () => { | ||
if (typeof this.state.onOpenComplete == 'function') { | ||
return this.state.onOpenComplete(); | ||
if (typeof this.state.onOpen == 'function') { | ||
return this.state.onOpen(); | ||
} | ||
@@ -110,2 +112,5 @@ }); | ||
}).start(() => { | ||
if (typeof this.state.onOpenComplete == 'function') { | ||
return this.state.onOpenComplete(); | ||
} | ||
this.runTiming(); | ||
@@ -128,2 +133,5 @@ }); | ||
hideToast() { | ||
if (typeof this.state.onClose == 'function') { | ||
return this.state.onClose(); | ||
} | ||
const {minHeight, onCloseComplete} = this.state; | ||
@@ -130,0 +138,0 @@ let toValue = 0; |
9123712
0.01%1101
0.73%332
0.61%