Skip to content

Instantly share code, notes, and snippets.

@jm90m
Created July 30, 2017 21:34
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 jm90m/170548697f555e4b9e905ba83f064800 to your computer and use it in GitHub Desktop.
Save jm90m/170548697f555e4b9e905ba83f064800 to your computer and use it in GitHub Desktop.
expo-netflix-example
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