NativeBase: [Docs] Drawer sample won't work as there is no Sidebar import.
Sidebar component are being used but wasn’t imported. Is sidebar templates available and ready to import ? Should it be mentioned ?
import React, { Component } from 'react';
import { Drawer } from 'native-base';
export default class DrawerExample extends Component {
render() {
closeDrawer = () => {
this._drawer._root.close()
};
openDrawer = () => {
this._drawer._root.open()
};
return (
<Drawer
ref={(ref) => { this._drawer = ref; }}
content={<SideBar navigator={this._navigator} />}
onClose={() => this.closeDrawer()}
>
// Main View
</Drawer>
);
}
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (3 by maintainers)
sidebar.js
Main.js
AppHeader.js
I think improving the documentation to show a complete working example would be helpful including hooking into the appropriate button. I’m having a lot of trouble getting the component working inside my application.
Please what does the Sidebar Template looks like?? and how do we invoke the open and close drawer??? I think it will be more appropriate if a link is provided as to what the Sidebar Component might look like…