1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-23 20:07:40 +02:00
unleash.unleash/frontend/src/component/layout/main.jsx

36 lines
1.2 KiB
React
Raw Normal View History

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Layout, Content, Footer, Grid, Cell } from 'react-mdl';
import styles from '../styles.scss';
import ErrorContainer from '../error/error-container';
import Header from '../menu/header';
import ShowApiDetailsContainer from '../api/show-api-details-container';
import { FooterMenu } from '../menu/footer';
export default class App extends PureComponent {
static propTypes = {
location: PropTypes.object.isRequired,
};
render() {
return (
<Layout fixedHeader>
<Header location={this.props.location} />
<Content className="mdl-color--grey-50" style={{ display: 'flex', flexDirection: 'column' }}>
<Grid noSpacing className={styles.content} style={{ flex: 1 }}>
<Cell col={12}>
{this.props.children}
<ErrorContainer />
</Cell>
</Grid>
<Footer size="mega">
<FooterMenu />
<ShowApiDetailsContainer />
</Footer>
</Content>
</Layout>
);
}
}