Base.js 881 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import React, { Component } from 'react'
  2. import Topbar from './Topbar'
  3. import Sidebar from './Sidebar'
  4. import { withStyles } from 'material-ui/styles'
  5. const styles = theme => ({
  6. root: {
  7. flexGrow: 1,
  8. zIndex: 1,
  9. overflow: 'hidden',
  10. position: 'relative',
  11. display: 'flex'
  12. },
  13. content: {
  14. flexGrow: 1,
  15. backgroundColor: theme.palette.background.default,
  16. padding: theme.spacing.unit * 3,
  17. minWidth: 0
  18. }
  19. })
  20. class Base extends Component {
  21. render() {
  22. const { classes } = this.props
  23. return (
  24. <div className={classes.root}>
  25. <Topbar />
  26. <Sidebar />
  27. <main className={classes.content}>
  28. {this.props.children}
  29. </main>
  30. </div>
  31. )
  32. }
  33. }
  34. export default withStyles(styles)(Base)