【发布时间】:2018-12-27 06:08:32
【问题描述】:
如何设置 react-native 导航抽屉的宽度,我可以改变抽屉内容的宽度,但是我不能改变主父的宽度,我总是看起来是白色的背景。
{
initialRouteName: 'Home',
drawerPosition: 'left',
contentComponent: withUserContext(CustomDrawerContentComponent),
drawerOpenRoute: 'DrawerOpen',
drawerToggleRoute: 'DrawerToggle',
drawerCloseRoute: 'DrawerClose',
style:{
drawer: {width:200, shadowColor: '#000000', shadowOpacity: 0.8, shadowRadius: 3},
main: {paddingLeft: 3}
},
contentOptions: {
activeTintColor: "white",
activeBackgroundColor: 'transparent',
inactiveTintColor: '#c5e6fc',
inactiveBackgroundColor: 'transparent',
labelStyle: {
fontSize: 15,
marginLeft: 10,
},
},
}
任何帮助将不胜感激。
提前致谢。
【问题讨论】:
标签: react-native react-navigation drawer