In one of our projects, there is a need to have a different background color for a selected tab (example below).
What changed?
Added tabStyle and selectedTabStyle props to TabNavigator
The correct styles are passed down to Tab based on if the tab is selected
I'm only planning on using selectedTabStyle and it seems having a different style per tab is an anti-pattern (as is pointed out in Material Design's Bottom Navigation docs), but I guess configurability is good? ¯\_(ツ)_/¯
We merged #73 instead -- similar API but no selectedTabStyle. You should be able to change the style you pass in when you re-render your app upon tab selection.
Why?
In one of our projects, there is a need to have a different background color for a selected tab (example below).
What changed?
tabStyle
andselectedTabStyle
props toTabNavigator
Tab
based on if the tab is selectedselectedTabStyle
and it seems having a different style per tab is an anti-pattern (as is pointed out in Material Design's Bottom Navigation docs), but I guess configurability is good?¯\_(ツ)_/¯