Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vishalnarkhede
Last active April 10, 2020 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishalnarkhede/0095ad6050a8fdefd47dfefeffe9a844 to your computer and use it in GitHub Desktop.
Save vishalnarkhede/0095ad6050a8fdefd47dfefeffe9a844 to your computer and use it in GitHub Desktop.
import React from 'react';
import {View, SafeAreaView, Text, StyleSheet} from 'react-native';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {NavigationContainer} from '@react-navigation/native';
/** This is where you will put your channel component which container MessageList and MessageInput component */
function ChannelScreen({navigation, route}) {
return (
<SafeAreaView>
<Text>Channel Screen</Text>
</SafeAreaView>
);
}
/** This is where you will put your channel list based navigation */
const ChannelListDrawer = (props) => {
return (
<SafeAreaView>
<Text>Drawer</Text>
</SafeAreaView>
);
};
const Drawer = createDrawerNavigator();
export default function App() {
return (
<NavigationContainer>
<View style={styles.container}>
<Drawer.Navigator
drawerContent={ChannelListDrawer}
drawerStyle={styles.drawerNavigator}>
<Drawer.Screen name="ChannelScreen" component={ChannelScreen} />
</Drawer.Navigator>
</View>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
channelScreenSaveAreaView: {
backgroundColor: 'white',
},
channelScreenContainer: {flexDirection: 'column', height: '100%'},
container: {
flex: 1,
},
drawerNavigator: {
backgroundColor: '#3F0E40',
width: 350,
},
chatContainer: {
backgroundColor: 'white',
flexGrow: 1,
flexShrink: 1,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment