Only collapse when clicking on header

This commit is contained in:
Lukas Martinelli 2016-12-21 11:27:49 +01:00
parent 18674f5edb
commit c776d19aed

View file

@ -28,9 +28,7 @@ export default class LayerEditorGroup extends React.Component {
} }
render() { render() {
return <div return <div>
onClick={e => this.props.onActiveToggle(!this.props.isActive)}
>
<div style={{ <div style={{
fontSize: fontSizes[4], fontSize: fontSizes[4],
backgroundColor: colors.gray, backgroundColor: colors.gray,
@ -39,7 +37,9 @@ export default class LayerEditorGroup extends React.Component {
display: 'flex', display: 'flex',
flexDirection: 'row', flexDirection: 'row',
lineHeight: '20px', lineHeight: '20px',
}}> }}
onClick={e => this.props.onActiveToggle(!this.props.isActive)}
>
<span>{this.props.title}</span> <span>{this.props.title}</span>
<span style={{flexGrow: 1}} /> <span style={{flexGrow: 1}} />
<Collapser isCollapsed={this.props.isActive} /> <Collapser isCollapsed={this.props.isActive} />