1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/component/app.jsx

47 lines
1.6 KiB
React
Raw Normal View History

2016-11-10 14:26:24 +01:00
import React, { Component } from 'react';
import { Layout, Panel, NavDrawer, AppBar } from 'react-toolbox';
import style from './styles.scss';
import ErrorContainer from './error/error-container';
import UserContainer from './user/user-container';
2016-11-25 15:37:06 +01:00
import ShowUserContainer from './user/show-user-container';
2016-11-10 14:26:24 +01:00
import Navigation from './nav';
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}>
2016-11-25 15:37:06 +01:00
<AppBar title="Unleash Admin" leftIcon="menu" onLeftIconClick={this.toggleDrawerActive} className={style.appBar}>
<ShowUserContainer />
</AppBar>
2016-11-10 14:26:24 +01:00
<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' }}>
<UserContainer />
2016-11-10 14:26:24 +01:00
{this.props.children}
</div>
</Panel>
<ErrorContainer />
</Layout>
</div>
</div>
);
}
};