gorhom / react-native-animated-tabbar

A 60FPS animated tab bar with a variety of cool animation presets 😎
MIT License
1.7k stars 132 forks source link

backgroundColor not working when I set preset props is material? How can i change backgroundColor Tabbar in this case? #86

Open NguyenPhatBG opened 4 years ago

NguyenPhatBG commented 4 years ago

Below is my code: <Tab.Navigator tabBarOptions={{ style: { backgroundColor: 'tomato', }, }} tabBar={(props) => ( <AnimatedTabBar preset="material" tabs={tabs} iconSize={20} duration={500} {...props} /> )}

<Tab.Screen name="Profile" component={ProfileStack} options={({route}) => ({ tabBarVisible: getTabBarVisibility(route), })} /> </Tab.Navigator>

TheYass1n commented 3 years ago

Write the style out of tabBarOptions that work for me

<Tab.Navigator
style={{
backgroundColor: 'tomato',
}},
tabBarOptions={{
   ....
}}
tabBar={(props) => (
<AnimatedTabBar
preset="material"
tabs={tabs}
iconSize={20}
duration={500}
{...props}
/>