I am currently having a little trouble with respect to getting a button colour to change on click:
My current code for button is as follows:
handleClick = () => {
secondary=true
}
<RaisedButton className={classPrefix + '-listToggle'}
label="List View"
onClick = {this.handleClick}
icon={<Icon name="list" size={15} />}
/>
I also have a boolean called "secondary", which if 'true', changes the background color of the button. If I do the following code:
<RaisedButton className={classPrefix + '-listToggle'}
label="List View"
onClick = {this.handleClick}
secondary=true
icon={<Icon name="list" size={15} />}
/>
The button colour changes only on load, and remains the same if clicked.
What I ultimately want it to do is if button is clicked, set secondary to true, else, leave false.
Help?