diff --git a/package.json b/package.json index a0169e9..f27cce6 100644 --- a/package.json +++ b/package.json @@ -19,12 +19,16 @@ "mapbox-gl": "^0.23.0", "mapbox-gl-style-spec": "^8.8.0", "node-sass": "^3.9.2", - "react": "15.3.0", + "react": "^15.3.0", + "react-collapse": "^2.3.3", "react-dom": "15.3.0", "react-file-reader-input": "^1.1.0", "react-geomicons": "^2.0.5", + "react-height": "^2.1.1", "react-icons": "^2.2.1", "react-mapbox-gl": "^0.11.0", + "react-motion": "^0.4.4", + "react-scrollbar": "^0.4.1", "react-tap-event-plugin": "^1.0.0", "rebass": "^0.3.1", "sass-loader": "^4.0.1" diff --git a/src/app.jsx b/src/app.jsx index 408bd0b..98c5699 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -16,7 +16,7 @@ export class WorkspaceDrawer extends React.Component { editor = } - return {editor} - + } } diff --git a/src/layers.jsx b/src/layers.jsx index bb2e0fa..aac2964 100644 --- a/src/layers.jsx +++ b/src/layers.jsx @@ -1,23 +1,73 @@ import React from 'react' +import ScrollArea from 'react-scrollbar' -import { Toolbar, NavItem, Tooltip, Container, Space} from 'rebass' +import { Checkbox, Slider, Switch, Input, Panel, PanelHeader, Toolbar, NavItem, Tooltip, Container, Space} from 'rebass' import { Button, Text } from 'rebass' +import Collapse from 'react-collapse' import theme from './theme.js' -export class LayerEditor extends React.Component { +export class FillLayer extends React.Component { render() { - const layerBlocks = this.props.layers.map(layer => { - console.log(layer) - return {layer.id} - }); - return - - - Toolbar - - - {layerBlocks} - + return
+ + +
+ } +} + +export class LineLayer extends React.Component { + render() { + return
+ } +} + +export class SymbolLayer extends React.Component { + render() { + return
+ } +} + +export class LayerPanel extends React.Component { + constructor(props) { + super(props); + this.toggleLayer = this.toggleLayer.bind(this); + this.state = { + isOpened: false + } + } + + toggleLayer() { + this.setState({isOpened: !this.state.isOpened}) + } + + render() { + let layer = + if (this.props.layer.type === "line") { + layer = + } else if (this.props.layer.type === "symbol") { + layer = + } + + return + {this.props.layer.id} + + {layer} + + + } +} + +export class LayerEditor extends React.Component { + render() { + const layerPanels = this.props.layers.map(layer => { + return + }); + return
+ + Toolbar + + {layerPanels} +
} } diff --git a/src/theme.js b/src/theme.js index 6e66038..692c484 100644 --- a/src/theme.js +++ b/src/theme.js @@ -38,10 +38,6 @@ const dark = { backgroundColor: '#222', border: 0, }, - Panel: { - borderWidth: 2, - backgroundColor: '#000' - }, Heading: caps, Button: { color: '#00d9f7',