mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-15 17:50:48 +02:00
39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
import React, { Component } from 'react';
|
|
import { Layout, Panel, NavDrawer, AppBar } from 'react-toolbox';
|
|
import style from './style';
|
|
|
|
import Navigation from './Navigation';
|
|
|
|
export default class App extends Component {
|
|
constructor (props) {
|
|
super(props);
|
|
this.state = { drawerActive: false };
|
|
|
|
this.toggleDrawerActive = () => {
|
|
this.setState({ drawerActive: !this.state.drawerActive });
|
|
};
|
|
}
|
|
|
|
onOverlayClick = () => this.setState({ drawerActive: false });
|
|
|
|
render () {
|
|
return (
|
|
<div className={style.container}>
|
|
<AppBar title="Unleash Admin" leftIcon="menu" onLeftIconClick={this.toggleDrawerActive} className={style.appBar} />
|
|
<div className={style.container} style={{ top: '6.4rem' }}>
|
|
<Layout>
|
|
<NavDrawer active={this.state.drawerActive} permanentAt="sm" onOverlayClick={this.onOverlayClick} >
|
|
<Navigation />
|
|
</NavDrawer>
|
|
<Panel scrollY>
|
|
<div style={{ padding: '1.8rem' }}>
|
|
{this.props.children}
|
|
</div>
|
|
</Panel>
|
|
</Layout>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
};
|