I am currently working on styling an application with reactstrap, and I'm facing a challenge in changing the background color of the navigation bar from white to black. I tried setting the color attribute to "dark" in the nav tabs tag, but it didn't work as expected. Can anyone provide some guidance or assistance?
import React, { Component } from 'react';
import { Nav, NavItem, Dropdown, DropdownItem, DropdownToggle, DropdownMenu, NavLink } from 'reactstrap';
export default class CustomNav extends React.Component{
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.state = {
dropdownOpen: false
};
}
toggle() {
this.setState({
dropdownOpen: !this.state.dropdownOpen
});
}
render() {
return (
<div>
<Nav tabs style={{ backgroundColor: 'black' }}>
<NavItem>
<NavLink href="/" active>Home</NavLink>
</NavItem>
<Dropdown nav isOpen={this.state.dropdownOpen} toggle={this.toggle}>
<DropdownToggle nav caret>
Dropdown
</DropdownToggle>
<DropdownMenu>
<DropdownItem header>Header</DropdownItem>
<DropdownItem disabled>Action</DropdownItem>
<DropdownItem>Another Action</DropdownItem>
<DropdownItem divider />
<DropdownItem>Another Action</DropdownItem>
</DropdownMenu>
</Dropdown>
<NavItem>
<NavLink href="#">Link 1</NavLink>
</NavItem>
<NavItem>
<NavLink href="#">Link 2</NavLink>
</NavItem>
<NavItem>
<NavLink href="#">Link 3</NavLink>
</NavItem>
</Nav>
</div>
);
}
}