From 131b21eade6ec3e722c8e2d5b4d6770f573440a0 Mon Sep 17 00:00:00 2001 From: Luke Walczak Date: Tue, 28 Jul 2020 16:18:14 +0200 Subject: [PATCH] [RNMobile] Reduce spacing in slider (#24161) --- .../src/mobile/bottom-sheet/range-cell.native.js | 14 +++++++++----- .../src/mobile/bottom-sheet/range-cell.native.scss | 10 +++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/components/src/mobile/bottom-sheet/range-cell.native.js b/packages/components/src/mobile/bottom-sheet/range-cell.native.js index 96867a3863071..626ce9b134108 100644 --- a/packages/components/src/mobile/bottom-sheet/range-cell.native.js +++ b/packages/components/src/mobile/bottom-sheet/range-cell.native.js @@ -139,6 +139,7 @@ class BottomSheetRangeCell extends Component { } render() { + const isIOS = Platform.OS === 'ios'; const { value, defaultValue, @@ -150,10 +151,8 @@ class BottomSheetRangeCell extends Component { minimumTrackTintColor = preferredColorScheme === 'light' ? '#00669b' : '#5198d9', - maximumTrackTintColor = Platform.OS === 'ios' - ? '#e9eff3' - : '#909090', - thumbTintColor = Platform.OS === 'android' && '#00669b', + maximumTrackTintColor = isIOS ? '#e9eff3' : '#909090', + thumbTintColor = ! isIOS && '#00669b', getStylesFromColorScheme, ...cellProps } = this.props; @@ -175,11 +174,16 @@ class BottomSheetRangeCell extends Component { styles.sliderDarkTextInput ); + const cellRowContainerStyle = [ + styles.cellRowStyles, + isIOS ? styles.cellRowStylesIOS : styles.cellRowStylesAndroid, + ]; + return (