mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 01:15:26 +01:00
Reintroduce collapse library
This commit is contained in:
parent
9f7aeca1c5
commit
92996b1db5
2 changed files with 7 additions and 2 deletions
|
@ -31,11 +31,14 @@
|
||||||
"randomcolor": "^0.4.4",
|
"randomcolor": "^0.4.4",
|
||||||
"react": "^15.4.0",
|
"react": "^15.4.0",
|
||||||
"react-addons-pure-render-mixin": "^15.4.0",
|
"react-addons-pure-render-mixin": "^15.4.0",
|
||||||
|
"react-collapse": "^2.3.3",
|
||||||
"react-color": "^2.10.0",
|
"react-color": "^2.10.0",
|
||||||
"react-dom": "^15.4.0",
|
"react-dom": "^15.4.0",
|
||||||
"react-file-reader-input": "^1.1.0",
|
"react-file-reader-input": "^1.1.0",
|
||||||
|
"react-height": "^2.1.1",
|
||||||
"react-icon-base": "^2.0.4",
|
"react-icon-base": "^2.0.4",
|
||||||
"react-icons": "^2.2.1",
|
"react-icons": "^2.2.1",
|
||||||
|
"react-motion": "^0.4.7",
|
||||||
"react-sortable-hoc": "^0.4.5",
|
"react-sortable-hoc": "^0.4.5",
|
||||||
"request": "^2.79.0"
|
"request": "^2.79.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react'
|
||||||
import colors from '../../config/colors'
|
import colors from '../../config/colors'
|
||||||
import { margins, fontSizes } from '../../config/scales'
|
import { margins, fontSizes } from '../../config/scales'
|
||||||
|
|
||||||
|
import Collapse from 'react-collapse'
|
||||||
import CollapseOpenIcon from 'react-icons/lib/md/arrow-drop-down'
|
import CollapseOpenIcon from 'react-icons/lib/md/arrow-drop-down'
|
||||||
import CollapseCloseIcon from 'react-icons/lib/md/arrow-drop-up'
|
import CollapseCloseIcon from 'react-icons/lib/md/arrow-drop-up'
|
||||||
|
|
||||||
|
@ -45,12 +46,13 @@ export default class LayerEditorGroup extends React.Component {
|
||||||
<Collapser isCollapsed={this.props.isActive} />
|
<Collapser isCollapsed={this.props.isActive} />
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: this.props.isActive ? null : 'none',
|
|
||||||
border: 2,
|
border: 2,
|
||||||
borderStyle: 'solid',
|
borderStyle: 'solid',
|
||||||
borderColor: colors.gray,
|
borderColor: colors.gray,
|
||||||
}}>
|
}}>
|
||||||
{this.props.children}
|
<Collapse isOpened={this.props.isActive}>
|
||||||
|
{this.props.children}
|
||||||
|
</Collapse>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue