2016-12-20 16:37:35 +01:00
|
|
|
import React from 'react'
|
2017-11-06 16:32:04 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2016-12-21 12:06:33 +01:00
|
|
|
import ScrollContainer from './ScrollContainer'
|
2016-12-20 16:37:35 +01:00
|
|
|
|
2016-12-22 16:39:09 +01:00
|
|
|
class AppLayout extends React.Component {
|
2016-12-20 16:37:35 +01:00
|
|
|
static propTypes = {
|
2017-11-06 16:32:04 +01:00
|
|
|
toolbar: PropTypes.element.isRequired,
|
|
|
|
layerList: PropTypes.element.isRequired,
|
|
|
|
layerEditor: PropTypes.element,
|
|
|
|
map: PropTypes.element.isRequired,
|
|
|
|
bottom: PropTypes.element,
|
2018-06-03 11:00:50 +02:00
|
|
|
modals: PropTypes.node,
|
2016-12-20 16:37:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static childContextTypes = {
|
2017-11-06 16:32:04 +01:00
|
|
|
reactIconBase: PropTypes.object
|
2016-12-20 16:37:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
getChildContext() {
|
|
|
|
return {
|
2017-01-11 14:11:45 +01:00
|
|
|
reactIconBase: { size: 14 }
|
2016-12-20 16:37:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2017-01-10 21:28:30 +01:00
|
|
|
return <div className="maputnik-layout">
|
2016-12-20 16:37:35 +01:00
|
|
|
{this.props.toolbar}
|
2017-01-10 21:28:30 +01:00
|
|
|
<div className="maputnik-layout-list">
|
2016-12-21 12:06:33 +01:00
|
|
|
<ScrollContainer>
|
|
|
|
{this.props.layerList}
|
|
|
|
</ScrollContainer>
|
2016-12-20 16:37:35 +01:00
|
|
|
</div>
|
2017-01-10 21:28:30 +01:00
|
|
|
<div className="maputnik-layout-drawer">
|
2016-12-21 12:06:33 +01:00
|
|
|
<ScrollContainer>
|
|
|
|
{this.props.layerEditor}
|
|
|
|
</ScrollContainer>
|
2016-12-20 16:37:35 +01:00
|
|
|
</div>
|
|
|
|
{this.props.map}
|
2017-01-10 21:28:30 +01:00
|
|
|
{this.props.bottom && <div className="maputnik-layout-bottom">
|
2016-12-30 13:21:03 +01:00
|
|
|
{this.props.bottom}
|
|
|
|
</div>
|
|
|
|
}
|
2018-05-29 18:06:00 +02:00
|
|
|
{this.props.modals}
|
2016-12-20 16:37:35 +01:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
2016-12-22 16:39:09 +01:00
|
|
|
|
|
|
|
export default AppLayout
|