Skip to content

Commit

Permalink
Remove custom animations from Bottom-Sheet (#18782)
Browse files Browse the repository at this point in the history
This fixes a crash on iOS described here: wordpress-mobile/gutenberg-mobile#12
  • Loading branch information
etoledom authored Nov 28, 2019
1 parent 139f525 commit e32400c
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions packages/components/src/mobile/bottom-sheet/index.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { Text, View, Platform, PanResponder, Dimensions, Easing } from 'react-native';
import { Text, View, Platform, PanResponder, Dimensions } from 'react-native';
import Modal from 'react-native-modal';
import SafeArea from 'react-native-safe-area';

Expand Down Expand Up @@ -98,38 +98,13 @@ class BottomSheet extends Component {
</View>
);

const { height } = Dimensions.get( 'window' );
const easing = Easing.bezier( 0.450, 0.000, 0.160, 1.020 );

const animationIn = {
easing,
from: {
translateY: height,
},
to: {
translateY: 0,
},
};

const animationOut = {
easing,
from: {
translateY: 0,
},
to: {
translateY: height,
},
};

const backgroundStyle = getStylesFromColorScheme( styles.background, styles.backgroundDark );

return (
<Modal
isVisible={ isVisible }
style={ styles.bottomModal }
animationIn={ animationIn }
animationInTiming={ 600 }
animationOut={ animationOut }
animationOutTiming={ 250 }
backdropTransitionInTiming={ 50 }
backdropTransitionOutTiming={ 50 }
Expand Down

0 comments on commit e32400c

Please sign in to comment.