-
-
Save dk0r/499605b44e3cfead5452081b74175330 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
export default class DrawerContainer extends Component { | |
render() { | |
drawerCheck = () => { | |
this.drawer | |
? this.drawer.openDrawer() | |
: alert('this.drawer is Undefined!') | |
} | |
return ( | |
<DrawerLayout | |
ref={drawerLayout => (this.drawer = drawerLayout)} | |
{/*This renders the content inside of the drawer itself*/} | |
renderNavigationView={() => | |
<Home {...this.props} drawerOpen={this.drawerCheck} />} | |
drawerWidth={300} | |
drawerPosition={DrawerLayout.positions.Left} | |
> | |
{/* This is the Home screen which contains the drawer open button */} | |
<Home {...this.props} drawerOpen={this.drawerCheck} /> | |
</DrawerLayout> | |
) | |
} | |
} |
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
export default class Home extends Component { | |
render() { | |
return ( | |
<View style={styles.menu}> | |
<TeamMenu {...this.props} /> | |
</View> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment