Created
July 30, 2017 21:34
-
-
Save jm90m/170548697f555e4b9e905ba83f064800 to your computer and use it in GitHub Desktop.
expo-netflix-example
This file contains hidden or 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 { StatusBar } from 'react-native'; | |
import { DrawerNavigator, DrawerItems } from 'react-navigation'; | |
import HomeStackNavigator from 'components/navigation/home-stack-navigator'; | |
import { COLORS } from 'constants/styles'; | |
import styled from 'styled-components/native'; | |
const DrawerContainer = styled.View` | |
flex: 1; | |
background-color: ${COLORS.GREY.BRIGHT_GREY}; | |
`; | |
const AppContainer = styled.View` | |
flex: 1; | |
background-color: ${COLORS.GREY.BLACK_RUSSIAN}; | |
`; | |
const drawerRouteConfig = { | |
Home: { | |
screen: HomeStackNavigator, | |
}, | |
}; | |
const CustomDrawerContentComponent = props => ( | |
<DrawerContainer> | |
<DrawerItems {...props} /> | |
</DrawerContainer> | |
); | |
const drawerNavigatorConfig = { | |
contentComponent: props => <CustomDrawerContentComponent {...props} />, | |
}; | |
const AppDrawer = DrawerNavigator(drawerRouteConfig, drawerNavigatorConfig); | |
export default class App extends React.Component { | |
render() { | |
return ( | |
<AppContainer> | |
<StatusBar hidden={true} /> | |
<AppDrawer /> | |
</AppContainer> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment