Last active
April 10, 2020 13:32
-
-
Save vishalnarkhede/0095ad6050a8fdefd47dfefeffe9a844 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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