【发布时间】:2019-05-21 14:17:57
【问题描述】:
我已经完成了 TopTabNavigator,并在 One 选项卡上设置了背景。 我想知道如何在此选项卡处于非活动状态时移除不透明度。
无论是否集中,我都尝试使用相同的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> ),
【问题讨论】:
-
您找到解决方案了吗?
标签: reactjs tabs focus native opacity