我是React native的新手,我在应用程序中添加了一个React导航抽屉菜单,但如何为菜单项添加边框颜色?我已经做了这个
options={{
drawerLabel: 'Page title',
drawerIcon: () => (
<View
style={
{
borderLeftColor: 'red',
borderLeftWidth: 2,
paddingLeft: 5,
}
}>
</View>
),
}}
通过在抽屉导航中修改itemStyle找到的解决方案
<Drawer.Navigator
drawerContentOptions={{
activeTintColor: '#D09900',
itemStyle: { borderRadius:0,marginVertical: 0,borderBottomWidth:0.5,borderBottomColor:'#D09900' },
}}>