Using deconstructors for faster rendering
This commit is contained in:
parent
92a9ad2feb
commit
41d7f6e56f
1 changed files with 5 additions and 6 deletions
|
@ -17,19 +17,18 @@ class VerticalCollapsibleSplit extends React.Component {
|
||||||
let {
|
let {
|
||||||
props,
|
props,
|
||||||
state,
|
state,
|
||||||
collapse,
|
|
||||||
} = this;
|
} = this;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'vertical-split'}>
|
<div className={'vertical-split'}>
|
||||||
<div className='visible-content' data-name={this.props.name}>
|
<div className='visible-content' data-name={props.name}>
|
||||||
{this.props.top}
|
{props.top}
|
||||||
<button className='collapse-button' onClick={this.collapse}>
|
<button className='collapse-button' onClick={this.collapse}>
|
||||||
{this.state.closed ? <Icon.PlusCircle className='plus-icon' /> : <Icon.MinusCircle /> }
|
{state.closed ? <Icon.PlusCircle className='plus-icon' /> : <Icon.MinusCircle />}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className='collapse-content' data-name={this.props.name}>
|
<div className='collapse-content' data-name={props.name}>
|
||||||
{this.props.bottom}
|
{props.bottom}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue