File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ import {
8
8
Text ,
9
9
Animated ,
10
10
Dimensions ,
11
- TouchableWithoutFeedback ,
11
+ Pressable ,
12
12
Easing ,
13
- Keyboard
13
+ Keyboard ,
14
+ TouchableWithoutFeedback
14
15
} from 'react-native' ;
15
16
import { ViewPropTypes , TextPropTypes } from 'deprecated-react-native-prop-types' ;
16
17
const TOAST_MAX_WIDTH = 0.8 ;
@@ -58,6 +59,7 @@ let styles = StyleSheet.create({
58
59
}
59
60
} ) ;
60
61
62
+ const Touchable = Pressable || TouchableWithoutFeedback ;
61
63
class ToastContainer extends Component {
62
64
static displayName = 'ToastContainer' ;
63
65
@@ -246,7 +248,7 @@ class ToastContainer extends Component {
246
248
accessibilityHint = { this . props . accessibilityHint ? this . props . accessibilityHint : undefined }
247
249
accessibilityRole = { this . props . accessibilityRole ? this . props . accessibilityRole : "alert" }
248
250
>
249
- < TouchableWithoutFeedback
251
+ < Touchable
250
252
onPress = { ( ) => {
251
253
typeof this . props . onPress === 'function' ? this . props . onPress ( ) : null
252
254
this . props . hideOnPress ? this . _hide ( ) : null
@@ -275,7 +277,7 @@ class ToastContainer extends Component {
275
277
{ this . props . children }
276
278
</ Text >
277
279
</ Animated . View >
278
- </ TouchableWithoutFeedback >
280
+ </ Touchable >
279
281
</ View > : null ;
280
282
}
281
283
}
You can’t perform that action at this time.
0 commit comments