maputnik/src/app.jsx

54 lines
1 KiB
React
Raw Normal View History

2016-09-08 19:47:29 +02:00
import {Workspace} from './workspace.jsx';
import {Map} from './map.jsx';
import {Toolbar} from './toolbar.jsx';
2015-06-15 15:21:19 +02:00
import React from 'react';
2016-09-08 19:47:29 +02:00
import styles from './layout.scss';
import { Drawer, Container, Block, Fixed } from 'rebass'
import { LayerEditor } from './layers.jsx'
import theme from './theme.jsx'
2015-06-15 15:21:19 +02:00
2016-09-08 21:42:18 +02:00
export class WorkspaceDrawer extends React.Component {
render() {
return <Container style={{
zIndex: 100,
position: "fixed",
height: "100%",
left: "60",
width: 300,
top: "0",
bottom: "0",
backgroundColor: theme.colors.gray}
} >
<LayerEditor />
</Container>;
}
}
2015-06-15 15:21:19 +02:00
export default class App extends React.Component {
2016-09-08 19:47:29 +02:00
static childContextTypes = {
rebass: React.PropTypes.object,
reactIconBase: React.PropTypes.object
}
getChildContext () {
return {
rebass: theme,
reactIconBase: {
size: 20,
}
}
}
2015-06-15 15:21:19 +02:00
render() {
return (
2016-09-08 19:47:29 +02:00
<div>
<Toolbar />
2016-09-08 21:42:18 +02:00
<WorkspaceDrawer />
2016-09-08 19:47:29 +02:00
<div className={styles.layoutMap}>
<Map />
</div>
2015-06-15 15:21:19 +02:00
</div>
)
}
2016-09-08 19:47:29 +02:00
}