From d22186b58cc8fb0cef3268bb6da39d8019f56f4f Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Thu, 22 Mar 2018 20:43:38 -0700 Subject: [PATCH] Remove wrapper around tab bar --- packages/tabs/src/views/TabBarBottom.js | 75 ++++++++++++------------- 1 file changed, 35 insertions(+), 40 deletions(-) diff --git a/packages/tabs/src/views/TabBarBottom.js b/packages/tabs/src/views/TabBarBottom.js index 00f791fd..c98326e0 100644 --- a/packages/tabs/src/views/TabBarBottom.js +++ b/packages/tabs/src/views/TabBarBottom.js @@ -185,46 +185,44 @@ class TabBarBottom extends React.Component { ]; return ( - - - {routes.map((route, index) => { - const focused = index === navigation.state.index; - const scene = { route, focused }; + + {routes.map((route, index) => { + const focused = index === navigation.state.index; + const scene = { route, focused }; - const backgroundColor = focused - ? activeBackgroundColor - : inactiveBackgroundColor; + const backgroundColor = focused + ? activeBackgroundColor + : inactiveBackgroundColor; - return ( - { - jumpToIndex(index); - onTabPress({ route }); - }} + return ( + { + jumpToIndex(index); + onTabPress({ route }); + }} + > + - - {this._renderIcon(scene)} - {this._renderLabel(scene)} - - - ); - })} - - + {this._renderIcon(scene)} + {this._renderLabel(scene)} + + + ); + })} + ); } } @@ -237,9 +235,6 @@ const styles = StyleSheet.create({ backgroundColor: '#F7F7F7', // Default background color in iOS 10 borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: 'rgba(0, 0, 0, .3)', - }, - container: { - flex: 1, flexDirection: 'row', }, tabBarCompact: {