Reputation:
I am using react-navigation, and when I use top-tab and stack, I get this border. enter image description here
How Do I remove this? My code looks something like this
const ShoutoutTopTab = createMaterialTopTabNavigator();
const ShoutoutTopTabScreen = () => {
return (<ShoutoutTopTab.Navigator
tabBarOptions={{
indicatorStyle: {backgroundColor:'#4A6159'},
tabStyle: {}
}} >
<ShoutoutTopTab.Screen name="GLOBAL" component={GlobalShoutout}/>
<ShoutoutTopTab.Screen name="COUNTRY" component={CountryShoutout}/>
</ShoutoutTopTab.Navigator>)
}
Upvotes: 3
Views: 1084
Reputation: 446
What looks like a bottom border is actually a shadow.
tabBarOptions = {{
style: {
shadowOpacity: 0,
elevation: 0,
}
}}
This works for both IOS and Android. Tested on 5.3.15.
Upvotes: 0
Reputation: 21
For anyone who still has the issue, Try:
(tested in material-top-tabs 5.3.14)
tabBarOptions = {{
style: {
shadowOpacity: 0
}
}}
Upvotes: 2
Reputation: 3150
You can do it this way:
headerStyle: {
borderBottomWidth: 0,
}
Upvotes: 0
Reputation: 1568
Try this
tabBarOptions = {{
indicatorStyle: { backgroundColor: '#4A6159' },
tabStyle: {
borderBottomWidth: 0
}
}} >
Upvotes: 0