【发布时间】:2020-03-21 19:42:28
【问题描述】:
我想在左边显示标签,在右边显示drawerIcon,但不知道怎么做。 这是代码
<Drawer.Navigator
drawerContentOptions={{
contentContainerStyle: {
backgroundColor: Colors.primary,
height: "100%"
},
labelStyle: { color: "white" }
}}
>
<Drawer.Screen
name="HomeScreen"
component={Home}
options={{ drawerLabel: "Home" }}
/>
<Drawer.Screen
name="Channels"
component={Channels}
options={{
drawerIcon: () => (
<AntDesign
name="pluscircle"
size={20}
color="white"
/>
)
}}
/>
</Drawer.Navigator>
我想在左侧显示“频道”,在右侧显示加号图标
【问题讨论】:
标签: react-native react-navigation react-navigation-drawer