Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.04 KB

Drawer.md

File metadata and controls

33 lines (28 loc) · 1.04 KB

Drawer

Drawer for both iOS and Android.
Drawer can be the perfect option to provide navigation options.

Preview ios Drawer Preview android Drawer

Syntax

import React, { Component } from 'react';
import { Drawer } from 'native-base';
import SideBar from './yourPathToSideBar';
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>
        );
    }
}

Note: You need to create your own SideBar component and import it.