From 70ec8bc25ae2063a4eacc0594fe0bd6b83586be5 Mon Sep 17 00:00:00 2001 From: carsonwah Date: Wed, 2 Jan 2019 17:27:37 +0800 Subject: [PATCH] Refactor name of a constant --- src/views/DefaultPopup.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/DefaultPopup.js b/src/views/DefaultPopup.js index dc69d7f..3bb3136 100644 --- a/src/views/DefaultPopup.js +++ b/src/views/DefaultPopup.js @@ -17,7 +17,7 @@ const slideOffsetYToTranslatePixelMapping = { outputRange: [-150, 0] }; -const horizontalOffset = 8; // margin from left/right +const HORIZONTAL_MARGIN = 8; // left/right margin to screen edge const getAnimatedContainerStyle = ({containerSlideOffsetY, containerDragOffsetY, containerScale}) => { // Map 0-1 value to translateY value @@ -247,9 +247,9 @@ const styles = StyleSheet.create({ popupContainer: { position: 'absolute', minHeight: 86, - width: deviceWidth - (horizontalOffset * 2), - left: horizontalOffset, - right: horizontalOffset, + width: deviceWidth - (HORIZONTAL_MARGIN * 2), + left: HORIZONTAL_MARGIN, + right: HORIZONTAL_MARGIN, top: CONTAINER_MARGIN_TOP, backgroundColor: 'white', // TEMP borderRadius: 12,