I am new to React JS. I am creating a simple web page using React-bootstrap. I need to change the Heading color and the text color, and also the background color, when I click a button. For an example, when I click the Green button, it will make changes in heading color to dark Green and text part to light green within the green color background. What should I add the code for manage this ?
Here my code
import React, { Component } from 'react';
class Page extends Component {
render() {
return (
<div>
<div style={{ background: "#f0f0f0f" }}>
<h3 style={{ color: 'Black' }}>Heading</h3>
<p style={{ color: '#706c61' }}> This is a text... </p>
</div>
<div>
<button> White </button>
<button> Purple </button>
<button> Red </button>
<button> Green </button>
</div>
</div>
);
}
}
export default Page;