Layout see an example
import Layout from 'react-layout-drawer';
<Layout>
<Layout.Drawer>
...
</Layout.Drawer>
<Layout.Page>
...
</Layout.Page>
</Layout>
If you need to open the box, you can use the context api. Context for the box is available inside on any nesting.
import Layout from 'react-layout-drawer';
<Layout.Consumer>
{({ openDrawer, closeDrawer }) => (
<div>
<button onClick={openDrawer}>Open</button>
<button onClick={closeDrawer}>Close</button>
</div>
)}
</Layout.Consumer>