From de27ae81a86aa4257df1331ffa099d071756141c Mon Sep 17 00:00:00 2001 From: Minesh Mitha Date: Sun, 14 Oct 2018 19:42:47 +0100 Subject: [PATCH] Added border left on asset information + variable change on collapse component --- client/scss/asset-display/_asset-display.scss | 21 ++++++++++++++++++- .../scss/vertical-split/_vertical-split.scss | 2 +- .../VerticalCollapsibleSplit/index.jsx | 12 +++++------ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/client/scss/asset-display/_asset-display.scss b/client/scss/asset-display/_asset-display.scss index b756ccbd..d9367cde 100644 --- a/client/scss/asset-display/_asset-display.scss +++ b/client/scss/asset-display/_asset-display.scss @@ -57,10 +57,29 @@ .visible-content { width: 100%; 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 { 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 { white-space: pre-line; font-size: 14px; @@ -70,7 +89,7 @@ width: 360px; } .asset-information { - width: 320px; + width: 341px; } } \ No newline at end of file diff --git a/client/scss/vertical-split/_vertical-split.scss b/client/scss/vertical-split/_vertical-split.scss index 665e4c80..1271c83b 100644 --- a/client/scss/vertical-split/_vertical-split.scss +++ b/client/scss/vertical-split/_vertical-split.scss @@ -6,7 +6,7 @@ align-items : center; }; -.collapse-content.hidden{ +.collapse-content.closed{ display: none; } diff --git a/client/src/components/VerticalCollapsibleSplit/index.jsx b/client/src/components/VerticalCollapsibleSplit/index.jsx index 6602b108..57cae21d 100644 --- a/client/src/components/VerticalCollapsibleSplit/index.jsx +++ b/client/src/components/VerticalCollapsibleSplit/index.jsx @@ -5,24 +5,24 @@ class VerticalCollapsibleSplit extends React.Component { constructor (props) { super(props); this.collapse = this.collapse.bind(this); - this.state = { open: true }; + this.state = { closed: false }; } collapse () { - this.setState({ open: !this.state.open }); - document.getElementById(this.props.name).classList.toggle('hidden'); + this.setState({ closed: !this.state.closed }); + document.querySelectorAll(`[data-name='${this.props.name}']`).forEach(el => el.classList.toggle('closed')); } render () { return (
-
+
{this.props.top}
-
+
{this.props.bottom}