Added border left on asset information + variable change on collapse component
This commit is contained in:
parent
8759bcfdd6
commit
de27ae81a8
3 changed files with 27 additions and 8 deletions
|
@ -57,10 +57,29 @@
|
||||||
.visible-content {
|
.visible-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 0 40px;
|
margin: 0 0 40px;
|
||||||
|
padding-bottom: 25px;
|
||||||
|
box-shadow: 0 1px 3px 2px rgba(169, 173, 186, 0.2);
|
||||||
|
&.closed {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.asset-information-wrap {
|
.asset-information-wrap {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
|
||||||
|
.horizontal-split {
|
||||||
|
justify-content: center;
|
||||||
|
.column {
|
||||||
|
&:first-child {
|
||||||
|
padding-right: 40px;
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
padding-left: 40px;
|
||||||
|
border-left: 1px solid #A9ADBA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
p.asset-description {
|
p.asset-description {
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -70,7 +89,7 @@
|
||||||
width: 360px;
|
width: 360px;
|
||||||
}
|
}
|
||||||
.asset-information {
|
.asset-information {
|
||||||
width: 320px;
|
width: 341px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
align-items : center;
|
align-items : center;
|
||||||
};
|
};
|
||||||
|
|
||||||
.collapse-content.hidden{
|
.collapse-content.closed{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,24 +5,24 @@ class VerticalCollapsibleSplit extends React.Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.collapse = this.collapse.bind(this);
|
this.collapse = this.collapse.bind(this);
|
||||||
this.state = { open: true };
|
this.state = { closed: false };
|
||||||
}
|
}
|
||||||
|
|
||||||
collapse () {
|
collapse () {
|
||||||
this.setState({ open: !this.state.open });
|
this.setState({ closed: !this.state.closed });
|
||||||
document.getElementById(this.props.name).classList.toggle('hidden');
|
document.querySelectorAll(`[data-name='${this.props.name}']`).forEach(el => el.classList.toggle('closed'));
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<div className={'vertical-split'}>
|
<div className={'vertical-split'}>
|
||||||
<div className='visible-content'>
|
<div className='visible-content' data-name={this.props.name}>
|
||||||
{this.props.top}
|
{this.props.top}
|
||||||
<button className='collapse-button' onClick={this.collapse}>
|
<button className='collapse-button' onClick={this.collapse}>
|
||||||
{this.state.open ? <Icon.PlusSquare /> : <Icon.MinusSquare /> }
|
{this.state.closed ? <Icon.MinusSquare /> : <Icon.PlusSquare /> }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className='collapse-content' id={this.props.name}>
|
<div className='collapse-content' data-name={this.props.name}>
|
||||||
{this.props.bottom}
|
{this.props.bottom}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue