Skip to content

Commit

Permalink
Remove padding
Browse files Browse the repository at this point in the history
mxck committed Jul 25, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c0fa80f commit 3625e83
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Menu.js
Original file line number Diff line number Diff line change
@@ -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({

0 comments on commit 3625e83

Please sign in to comment.