.navbar {
width: 100%;
background-color: #333;
padding: 10px 0;
text-align: center;
}
.hamburger {
display: inline-block;
cursor: pointer;
padding: 15px 20px;
color: #fff;
}
.hamburger span {
display: block;
width: 35px;
height: 5px;
background-color: #fff;
margin-bottom: 5px;
}
.menu {
display: none;
}
.menu ul {
list-style: none;
padding: 0;
margin: 0;
}
.menu ul li {
display: block;
padding: 10px 0;
border-bottom: 1px solid #666;
}
.menu ul li a {
color: #fff;
text-decoration: none;
}
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
isMenuOpen: false
};
}
toggleMenu = () => {
this.setState({ isMenuOpen: !this.state.isMenuOpen });
}
render() {
return (
);
}
}
ReactDOM.render(, document.getElementById(“root”));