Active tint color is not working in react native bottom tab navigator. color of name does change when focused but icon color is not changing. here is my navigator
<Tab.Navigator
screenOptions={({route}) => ({
tabBarIcon: ({focused, tintColor, size}) => {
let iconName;
if (route.name === 'Home') {
iconName = focused
? 'chatbubble-ellipses-sharp'
: 'chatbubble-ellipses-outline';
} else if (route.name === 'Setting') {
iconName = focused ? 'settings-sharp' : 'settings-outline';
}
// You can return any component that you like here!
return (
<Icon
name={iconName}
size={size}
color={tintColor}
type={'Ionicons'}
/>
);
},
})}
tabBarOptions={{
activeTintColor: 'tomato',
inactiveTintColor: 'gray',
}}>
<Tab.Screen name="Home" component={Home} />
<Tab.Screen name="Setting" component={Setting} />
</Tab.Navigator>
);
}
even if i type color manually like <Icon name={iconName} size={size} color={'red'} type={'Ionicons'} />
this it does not work.
any help?