Reputation: 43
I'm trying to change the background color of my React-Bootstrap Button.
I did this
const btn ={backgroundColor: '#F16E10'};
<Button bsStyle="" bsClass="btn" bsSize="large" onClick={this.handleEvent}>Something</Button>
But it's not working, who can I change this background color ?
Thanks,
Upvotes: 4
Views: 21955
Reputation: 1089
According to your code, you try to apply the class .btn but you just declared a const btn. Do you expect your button to have the backgrouncolor to #F16E10?
Did you try to add a prop style? like this
<Button bsStyle="" style={btn} bsClass="btn" bsSize="large">Something</Button>
Upvotes: 5