Common place for every component to use drawer
See original GitHub issueDo I need to use <Drawer> object for every component OR can I use it commonly? . Currently I have to repeat this code for every component
var Feed = React.createClass({
render: function() {
return (
<Drawer
ref={(ref) => this._drawer = ref}
style={styles.drawerStyles}
closedDrawerOffset={-3}
tapToClose={true}
openDrawerOffset={0.2}
content={<ControlPanel navigator={this.props.navigator}/>} >
<MainView
openControlPanel={this.openControlPanel}
closeControlPanel={this.closeControlPanel}
navigator={this.props.navigator}/>
</Drawer>
);
},
closeControlPanel: function() {
this._drawer.close()
},
openControlPanel: function() {
this._drawer.open()
},
onStartPress: function() {
this.props.navigator.replaceWithAnimation({name: 'feed'})
}
});
**<MainView> is getting replaced by other component only while rest of the code is same**
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Building a Drawer Component With React Portals | Let's Build UI
The drawer positioning can be controlled by a prop: left, top, right or bottom. The drawer can be dismissed either when clicking on...
Read more >Navigation drawer - Material Design
Destinations in a navigation drawer take the form of actionable list items. Each item describes its destination using a text label and optional...
Read more >Material Components: Navigation drawer - YouTube
Navigation drawers are panels anchored to one edge of the screen that provide access to different destinations in the app to complete tasks ......
Read more >Components of cabinet drawer - IVAN - Phụ kiện nội thất
Components of the cabinet drawer include: • Frame: The frame is produced first before making any furniture, which supports and connects the ...
Read more >React Native:-How to use a common drawer and toolbar ...
So I got drawer and toolbar in all inner pages. But now the question is how do I have control over drawer and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@joshuapinter sorry about that
@joshuapinter github is showing that you contributed to this repository. by the way if you have answer. you should pay attention to this tag. otherwise you can simply ignore it.