2020-02-19 23:57:07 +00:00
|
|
|
import Sticky from 'react-stickynode'
|
2020-03-25 03:08:43 +00:00
|
|
|
import * as Constants from '../constants'
|
2020-02-24 21:56:07 +00:00
|
|
|
import Search from '../components/search'
|
|
|
|
import ColumnHeader from '../components/column_header'
|
|
|
|
import Sidebar from '../components/sidebar'
|
2020-03-25 03:08:43 +00:00
|
|
|
// import Header from '../components/header'
|
|
|
|
// import Footer from '../components/footer'
|
2020-03-26 03:11:32 +00:00
|
|
|
import FloatingActionButton from '../components/floating_action_button'
|
2020-03-25 03:08:43 +00:00
|
|
|
import Responsive from '../features/ui/util/responsive_component'
|
2020-02-04 15:50:18 +00:00
|
|
|
|
2020-02-17 17:50:29 +00:00
|
|
|
export default class DefaultLayout extends PureComponent {
|
2020-02-04 15:50:18 +00:00
|
|
|
static propTypes = {
|
2020-02-19 23:57:07 +00:00
|
|
|
actions: PropTypes.array,
|
2020-02-22 23:26:23 +00:00
|
|
|
tabs: PropTypes.array,
|
2020-02-04 15:50:18 +00:00
|
|
|
layout: PropTypes.object,
|
2020-02-14 00:40:04 +00:00
|
|
|
title: PropTypes.string,
|
2020-02-19 23:57:07 +00:00
|
|
|
showBackBtn: PropTypes.bool,
|
2020-02-05 22:45:48 +00:00
|
|
|
}
|
2020-02-04 15:50:18 +00:00
|
|
|
|
|
|
|
render() {
|
2020-02-22 23:26:23 +00:00
|
|
|
const { children, title, showBackBtn, layout, actions, tabs } = this.props
|
|
|
|
|
2020-03-25 03:08:43 +00:00
|
|
|
console.log("Constants.BREAKPOINT_EXTRA_SMALL:", Constants.BREAKPOINT_EXTRA_SMALL)
|
|
|
|
|
2020-02-04 15:50:18 +00:00
|
|
|
return (
|
2020-03-04 03:45:16 +00:00
|
|
|
<div className={[_s.default, _s.flexRow, _s.width100PC, _s.heightMin100VH, _s.backgroundColorSecondary3].join(' ')}>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-03-25 03:08:43 +00:00
|
|
|
<Responsive min={Constants.BREAKPOINT_EXTRA_SMALL}>
|
|
|
|
<Sidebar />
|
|
|
|
</Responsive>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-02-21 00:57:29 +00:00
|
|
|
<main role='main' className={[_s.default, _s.flexShrink1, _s.flexGrow1, _s.borderColorSecondary2, _s.borderLeft1PX].join(' ')}>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-03-04 03:45:16 +00:00
|
|
|
<div className={[_s.default, _s.height53PX, _s.borderBottom1PX, _s.borderColorSecondary2, _s.backgroundColorSecondary3, _s.z3, _s.top0, _s.positionFixed].join(' ')}>
|
2020-03-11 23:56:18 +00:00
|
|
|
<div className={[_s.default, _s.height53PX, _s.pl15, _s.width1015PX, _s.flexRow, _s.justifyContentSpaceBetween].join(' ')}>
|
2020-02-21 00:57:29 +00:00
|
|
|
<div className={[_s.default, _s.width645PX].join(' ')}>
|
2020-02-22 23:26:23 +00:00
|
|
|
<ColumnHeader
|
|
|
|
title={title}
|
|
|
|
showBackBtn={showBackBtn}
|
|
|
|
actions={actions}
|
|
|
|
tabs={tabs}
|
|
|
|
/>
|
2020-02-08 22:57:09 +00:00
|
|
|
</div>
|
2020-03-26 03:11:32 +00:00
|
|
|
<Responsive min={Constants.BREAKPOINT_EXTRA_SMALL}>
|
|
|
|
<div className={[_s.default, _s.width340PX].join(' ')}>
|
|
|
|
<Search />
|
|
|
|
</div>
|
|
|
|
</Responsive>
|
2020-02-08 22:57:09 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-02-19 23:57:07 +00:00
|
|
|
<div className={[_s.default, _s.height53PX].join(' ')}></div>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-03-11 23:56:18 +00:00
|
|
|
<div className={[_s.default, _s.width1015PX, _s.flexRow, _s.justifyContentSpaceBetween, _s.pl15, _s.py15].join(' ')}>
|
2020-02-21 00:57:29 +00:00
|
|
|
<div className={[_s.default, _s.width645PX, _s.z1].join(' ')}>
|
2020-02-19 23:57:07 +00:00
|
|
|
<div className={_s.default}>
|
2020-02-04 15:50:18 +00:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-03-25 03:08:43 +00:00
|
|
|
<Responsive min={Constants.BREAKPOINT_EXTRA_SMALL}>
|
|
|
|
<div className={[_s.default, _s.width340PX].join(' ')}>
|
|
|
|
<Sticky top={73} enabled>
|
|
|
|
<div className={[_s.default, _s.width340PX].join(' ')}>
|
|
|
|
{layout}
|
|
|
|
</div>
|
|
|
|
</Sticky>
|
|
|
|
</div>
|
|
|
|
</Responsive>
|
|
|
|
|
2020-03-26 03:11:32 +00:00
|
|
|
<Responsive max={Constants.BREAKPOINT_EXTRA_SMALL}>
|
|
|
|
<FloatingActionButton />
|
|
|
|
</Responsive>
|
|
|
|
|
2020-02-04 15:50:18 +00:00
|
|
|
</div>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-02-04 15:50:18 +00:00
|
|
|
</main>
|
2020-02-14 00:40:04 +00:00
|
|
|
|
2020-02-04 15:50:18 +00:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|