Я сделал TopTabNavigator, и я установил фон на одной вкладке.Я хочу знать, как я могу удалить непрозрачность, когда эта вкладка неактивна.
Я пытался выполнить условие с тем же backgroundColor
, когда фокус или нет.
Может кто-нибудь подсказать мне, какподойти к этому вопросу?
tabBarLabel: ({focused}) => (
focused ?
<View
style={{backgroundColor:'#FF6D70', height: 30, width: 60, justifyContent: 'center',
borderBottomLeftRadius: 10, borderBottomRightRadius: 10, marginLeft: 1}}>
<Text style={{color:'white', fontSize: 10, textAlign: 'center'}}>dashboard</Text>
</View> :
<View
style={{backgroundColor:'#FF6D70', height: 30, width: 60, justifyContent: 'center',
borderBottomLeftRadius: 10, borderBottomRightRadius: 10, marginLeft: 1}}>
<Text style={{color:'white', fontSize: 10, textAlign: 'center'}}>dashboard</Text>
</View> ),