From 3625e83a4bf800c59c70df5eed2a92315d984879 Mon Sep 17 00:00:00 2001 From: Maksim Milyutin Date: Wed, 25 Jul 2018 22:47:09 +0700 Subject: [PATCH] Remove padding --- src/Menu.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Menu.js b/src/Menu.js index 3f71d38..867e164 100644 --- a/src/Menu.js +++ b/src/Menu.js @@ -21,7 +21,6 @@ const STATES = { const ANIMATION_DURATION = 300; const EASING = Easing.bezier(0.4, 0, 0.2, 1); -const MENU_PADDING_VERTICAL = 8; const SCREEN_INDENT = 8; class Menu extends React.Component { @@ -54,7 +53,6 @@ class Menu extends React.Component { } const { width, height } = e.nativeEvent.layout; - const menuHeightWithPadding = height - MENU_PADDING_VERTICAL * 2; this.setState( { @@ -65,7 +63,7 @@ class Menu extends React.Component { () => { Animated.parallel([ Animated.timing(this.state.menuSizeAnimation, { - toValue: { x: width, y: menuHeightWithPadding }, + toValue: { x: width, y: height }, duration: ANIMATION_DURATION, easing: EASING, }), @@ -152,8 +150,7 @@ class Menu extends React.Component { }); top = - Math.min(dimensions.height - SCREEN_INDENT, top + buttonHeight) - - MENU_PADDING_VERTICAL * 2; + Math.min(dimensions.height - SCREEN_INDENT, top + buttonHeight); } const shadowMenuContainerStyle = { @@ -221,9 +218,8 @@ const styles = StyleSheet.create({ shadowMenuContainer: { position: 'absolute', backgroundColor: 'white', - borderRadius: 2, + borderRadius: 4, opacity: 0, - paddingVertical: MENU_PADDING_VERTICAL, // Shadow ...Platform.select({