In my react application, I am looking to design a custom navbar
for the header using react-bootstrap
. Specifically, I need a dark styled NavDropdown
that changes background color to #f0ad4e
on hover. Despite attempting the following code snippet, I couldn't achieve the desired outcome.
<Nav className="mr-auto">
<Nav.Link href="#features">Home</Nav.Link>
<NavDropdown title="Inventory">
<NavDropdown.Item
href="#action/3.1"
style={{ backgroundColor: "black", color: 'white' }}
>
Products List
</NavDropdown.Item>
<NavDropdown.Item
href="#action/3.2"
style={{ backgroundColor: "black", color: 'white' }}
>
Top View Products
</NavDropdown.Item>
<NavDropdown.Item
href="#action/3.3"
style={{ backgroundColor: "black", color: 'white' }}
>
Add Products
</NavDropdown.Item>
</NavDropdown>
</Nav>
Despite implementing the above code, the output still displays white backgrounds at the top and bottom as shown in the image below.