File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ import {
88 Text ,
99 Animated ,
1010 Dimensions ,
11- TouchableWithoutFeedback ,
11+ Pressable ,
1212 Easing ,
13- Keyboard
13+ Keyboard ,
14+ TouchableWithoutFeedback
1415} from 'react-native' ;
1516import { ViewPropTypes , TextPropTypes } from 'deprecated-react-native-prop-types' ;
1617const TOAST_MAX_WIDTH = 0.8 ;
@@ -58,6 +59,7 @@ let styles = StyleSheet.create({
5859 }
5960} ) ;
6061
62+ const Touchable = Pressable || TouchableWithoutFeedback ;
6163class ToastContainer extends Component {
6264 static displayName = 'ToastContainer' ;
6365
@@ -246,7 +248,7 @@ class ToastContainer extends Component {
246248 accessibilityHint = { this . props . accessibilityHint ? this . props . accessibilityHint : undefined }
247249 accessibilityRole = { this . props . accessibilityRole ? this . props . accessibilityRole : "alert" }
248250 >
249- < TouchableWithoutFeedback
251+ < Touchable
250252 onPress = { ( ) => {
251253 typeof this . props . onPress === 'function' ? this . props . onPress ( ) : null
252254 this . props . hideOnPress ? this . _hide ( ) : null
@@ -275,7 +277,7 @@ class ToastContainer extends Component {
275277 { this . props . children }
276278 </ Text >
277279 </ Animated . View >
278- </ TouchableWithoutFeedback >
280+ </ Touchable >
279281 </ View > : null ;
280282 }
281283}
You can’t perform that action at this time.
0 commit comments