Add 'Show less' in detailed traffic info paragraph

This commit is contained in:
André Wahlberg 2020-12-11 18:23:51 +01:00
parent 6fc5fd8ea4
commit 30bcbd0286

View File

@ -59,7 +59,10 @@ class TrafficEntry extends Component {
</div> </div>
{lineInterference && {lineInterference &&
<div className="infoWrapper" onClick={this.toggle}> <div className="infoWrapper" onClick={this.toggle}>
<p className={`${this.state.expanded ? "expanded" : ""}`}>{trafficInfo}</p> <p className={`${this.state.expanded ? "expanded" : ""}`}>
{trafficInfo}
<span style={{display: (this.state.expanded ? "inline" : "none"), marginLeft: "5px" }}><u>Visa mindre</u></span>
</p>
<span style={{display: (this.state.expanded ? "none" : "block") }}><u>Visa mer</u></span> <span style={{display: (this.state.expanded ? "none" : "block") }}><u>Visa mer</u></span>
</div> </div>
} }