update button text to reflect state
This commit is contained in:
@ -40,7 +40,7 @@ class Collapse extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<button style={this.style.buttonStyle} onClick={this.toggleCollapse}>
|
<button style={this.style.buttonStyle} onClick={this.toggleCollapse}>
|
||||||
Show/Hide Content
|
{this.state.collapsed ? "Show Content" : "Hide Content" }
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div
|
||||||
style= {this.state.collapsed ? this.style.collapsed : this.style.expanded}
|
style= {this.state.collapsed ? this.style.collapsed : this.style.expanded}
|
||||||
|
|||||||
Reference in New Issue
Block a user