Is it possible to change the background color of the active NavItem element to green using inline CSS in React Bootstrap and React Router Dom? I am currently using TypeScript 2.2 and React. If not, should I create a CSS class instead?
Here is the code snippet:
const tabStyle: React.CSSProperties = {
backgroundColor: 'green'
}
return (
<main>
<div>
<Nav bsStyle="tabs" activeKey="1">
<LinkContainer to="/about">
<NavItem eventKey="1">About</NavItem>
</LinkContainer>
<LinkContainer to="/facts">
<NavItem eventKey="2">Facts</NavItem>
</LinkContainer>
</Nav>
</div>
</main>
);