maputnik/src/components/Layout.jsx

62 lines
1.3 KiB
React
Raw Normal View History

2016-12-20 16:37:35 +01:00
import React from 'react'
import theme from '../config/rebass'
import colors from '../config/colors'
export default class Layout extends React.Component {
static propTypes = {
toolbar: React.PropTypes.element.isRequired,
layerList: React.PropTypes.element.isRequired,
layerEditor: React.PropTypes.element,
map: React.PropTypes.element.isRequired,
}
static childContextTypes = {
rebass: React.PropTypes.object,
reactIconBase: React.PropTypes.object
}
getChildContext() {
return {
rebass: theme,
reactIconBase: { size: 20 }
}
}
render() {
return <div style={{
fontFamily: theme.fontFamily,
color: theme.color,
fontWeight: 300
}}>
{this.props.toolbar}
<div style={{
position: 'absolute',
bottom: 0,
height: "100%",
2016-12-20 20:36:02 +01:00
top: 40,
2016-12-20 16:37:35 +01:00
left: 0,
zIndex: 100,
2016-12-20 19:20:56 +01:00
width: 200,
2016-12-20 16:37:35 +01:00
overflow: "hidden",
2016-12-20 20:36:02 +01:00
backgroundColor: colors.black
2016-12-20 16:37:35 +01:00
}}>
{this.props.layerList}
</div>
<div style={{
position: 'absolute',
bottom: 0,
height: "100%",
2016-12-20 20:36:02 +01:00
top: 40,
2016-12-20 19:20:56 +01:00
left: 200,
2016-12-20 16:37:35 +01:00
zIndex: 100,
width: 300,
2016-12-20 20:36:02 +01:00
backgroundColor: colors.black
}}>
2016-12-20 16:37:35 +01:00
{this.props.layerEditor}
</div>
{this.props.map}
</div>
}
}