2016-12-20 16:37:35 +01:00
|
|
|
import React from 'react'
|
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 = {
|
|
|
|
toolbar: React.PropTypes.element.isRequired,
|
|
|
|
layerList: React.PropTypes.element.isRequired,
|
|
|
|
layerEditor: React.PropTypes.element,
|
|
|
|
map: React.PropTypes.element.isRequired,
|
2016-12-30 13:21:03 +01:00
|
|
|
bottom: React.PropTypes.element,
|
2016-12-20 16:37:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static childContextTypes = {
|
|
|
|
reactIconBase: React.PropTypes.object
|
|
|
|
}
|
|
|
|
|
|
|
|
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>
|
|
|
|
}
|
2016-12-20 16:37:35 +01:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
2016-12-22 16:39:09 +01:00
|
|
|
|
|
|
|
export default AppLayout
|