gab-social/app/javascript/gabsocial/components/page_layout.js

35 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-02-04 15:50:18 +00:00
import Header from './header'
export default class PageLayout extends PureComponent {
static propTypes = {
layout: PropTypes.object,
2020-02-05 22:45:48 +00:00
}
2020-02-04 15:50:18 +00:00
render() {
2020-02-05 22:45:48 +00:00
const { children, layout } = this.props
2020-02-04 15:50:18 +00:00
2020-02-05 22:45:48 +00:00
const right = layout.RIGHT || null
2020-02-04 15:50:18 +00:00
return (
2020-02-05 22:45:48 +00:00
<div className={[styles.default, styles.flexRow, styles.width100PC].join(' ')}>
2020-02-04 15:50:18 +00:00
<Header />
<main role='main' className={[styles.default, styles.flexShrink1, styles.flexGrow1, styles.flexRow].join(' ')}>
2020-02-05 22:45:48 +00:00
<div className={[styles.default, styles.width1015PX, styles.flexRow, styles.justifyContentSpaceBetween].join(' ')}>
<div className={[styles.default, styles.width660PX, styles.z1, styles.borderColorSubtle, styles.borderLeft1PX, styles.borderRight1PX].join(' ')}>
2020-02-04 15:50:18 +00:00
<div className={styles.default}>
{children}
</div>
</div>
2020-02-05 22:45:48 +00:00
<div className={[styles.default, styles.width325PX].join(' ')}>
2020-02-04 15:50:18 +00:00
<div className={styles.default}>
{right}
</div>
</div>
</div>
</main>
</div>
)
}
}