DrawerNavigator многоуровневое меню в реагировать - PullRequest
0 голосов
/ 07 января 2019

Я новичок в реагировании на родной язык, и я хочу, чтобы дочерние элементы были в навигаторе ящиков, но ничего не помогло, когда я пытаюсь найти то же самое ... Если у кого-то есть решение, пожалуйста, дайте мне знать ... Я делюсь своим кодом здесь:

const AppDrawerNavigator = DrawerNavigator({
  ServiceCategories: {
    screen: ServiceCategories,
    navigationOptions: {
      drawerLabel: 'Home',
      drawerIcon: () => (
        <Icon name="bars" size={18} color="#333" />
        )
    },
  },
  Profile: {
    screen: AppDrawerNavigator2,
    navigationOptions: {
      drawerLabel: 'My Profile',
      drawerIcon: () => (
        // {{ fontWeight:'bold',fontSize:20 }}
        <Icon name="user" size={18} color="#333" />
        )
    },
  },
{

  contentOptions: {
    activeTintColor: '#fff',
    inactiveTintColor: '#fff',
    activeBackgroundColor: '#ffb6cf',
    top:50,
    itemStyle: {
      fontSize: 18,
    },
  },
  contentComponent: (props) => (
    <View>
      <ScrollView>
      <DrawerUserDetail  navigation={props.navigation} />
        <DrawerItems
          {...props}
          getLabel = {(scene) => (
            <View style={{borderBottomWidth:0.5,borderBottomColor: "grey",width:width/1.9}}>
              <Text style={{color:'#333',fontSize:16,paddingBottom:10,paddingTop:10}}>{props.getLabel(scene)}</Text>
            </View>
          )}
        />
        </ScrollView>
      </View>
    )
});

В прессе о нас я хочу открыть здесь список всех статических страниц согласно требованию, поэтому, если у кого-то есть идея или код, пожалуйста, поделитесь.

...