Having some trouble changing the color of my navbar. Is there a step I might be missing?
Here's the component I'm trying to render:
import React from 'react';
import { Nav, Navbar } from 'react-bootstrap';
import styles from './MainMenu.module.css';
const Topbar = () => {
return(
<Navbar className={styles.mainBar}>
<Navbar.Brand>Restaurant</Navbar.Brand>
<Nav.Link>Menu</Nav.Link>
</Navbar>
);
}
export default Topbar;
This is the CSS module being used:
.mainBar{
background-color: rgb(255, 153, 0);
}
Below are the dependencies listed in the project's package.json file:
"dependencies": {
"@testing-library/jest-dom": "^5.12.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"bootstrap": "^4.6.0",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.2"
}
Bootstrap is correctly applied as it was imported into index.js...
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
reportWebVitals();