-
Notifications
You must be signed in to change notification settings - Fork 0
/
Navbar.js
38 lines (34 loc) · 1.06 KB
/
Navbar.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React, { useState } from "react";
import Logo from "../assets/pizzaLogo.png";
import { Link } from "react-router-dom";
import ReorderIcon from '@mui/icons-material/Reorder';
import "../styles/Navbar.css";
function Navbar() {
const [openLinks, setOpenLinks] = useState(false);
const toggleNavbar = () => {
setOpenLinks(!openLinks);
};
return (
<div className="navbar">
<div className="leftSide" id={openLinks ? "open" : "close"}>
<img src={Logo} />
<div className="hiddenLinks">
<Link to="/"> Home </Link>
<Link to="/menu"> Menu </Link>
<Link to="/about"> About </Link>
<Link to="/contact"> Contact </Link>
</div>
</div>
<div className="rightSide">
<Link to="/"> Home </Link>
<Link to="/menu"> Menu </Link>
<Link to="/about"> About </Link>
<Link to="/contact"> Contact </Link>
<button onClick={toggleNavbar}>
<ReorderIcon/>
</button>
</div>
</div>
);
}
export default Navbar;