1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/packages/unleash-frontend-next/src/App.jsx
2020-02-20 08:30:30 +01:00

36 lines
1.1 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 });
};
}
render () {
return (
<div className={style.container}>
<AppBar title="Unleash Admin" leftIcon="menu" onLeftIconClick={this.toggleDrawerActive} />
<Layout>
<NavDrawer active={this.state.drawerActive} permanentAt="sm" style={{ width: '200px' }}>
<Navigation />
</NavDrawer>
<Panel scrollY={false}>
<div style={{ padding: '1.8em' }}>
{this.props.children}
</div>
</Panel>
</Layout>
</div>
);
}
};