Как я могу скрыть ссылки в своем ящике реагирования? - PullRequest
0 голосов
/ 04 мая 2019

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

const AppDrawerNavigator = createDrawerNavigator({
  Home: drawer,
  Play: PlayScreen,
  Gall: Gallery,
  PlayerInput: PlayerInput,
  Cam: OpenCamera,
  srollView: ScrollView,
  Profil: Profil,
})
export default class HomeScreen extends React.Component {
    render() {
    return (
      <View style={styles.full}>
        <AppDrawerNavigator/>
      </View>
    );
  }
}

const styles = StyleSheet.create({
   full: {
   flex: 1,
   backgroundColor: '#458680',
   flexDirection:'column'
 },
});

Есть идеи? спасибо!

1 Ответ

0 голосов
/ 04 мая 2019

Сделайте следующие изменения в вашем коде:

const AppDrawerNavigator = createDrawerNavigator({
  Home: drawer,
  Play: PlayScreen,
  Gall: Gallery,
  PlayerInput: PlayerInput,
  Cam: OpenCamera,
  srollView: ScrollView,
  Profil: Profil,
},
{
    contentComponent: DrawerContent,
}
)

const DrawerContent = (props) => (
  <View>
    <View
      style={{
        height: '100%',
        backgroundColor: '#458680',
      }}
    >
      //Your code here whatever you wanna display
    </View>
    <DrawerItems {...props} />
  </View>
)
...