Реагируйте с навигацией 5 - Переместите значок элемента ящика слева направо - PullRequest
0 голосов
/ 21 марта 2020

Я хочу показать ярлык слева, а значок ящика справа, но не могу понять, как это сделать. Вот код

<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>

Я хотел бы показать "Каналы" на левой стороне и значок плюс на правой стороне

1 Ответ

0 голосов
/ 22 марта 2020

попробуй с headerLeft и headerRight

 headerLeft: () => (
      <Icon
        style={{padding: 10}}
        onPress={() => {
            consol.log("on press}}
        color={'white'}
        name="menu"
        size={30}
      />
...