forked from opencodeiiita/Productivity-Tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Navbar.js
84 lines (78 loc) · 1.82 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import React from "react";
import {
AppBar,
Toolbar,
CssBaseline,
Typography,
makeStyles,
useTheme,
useMediaQuery,
} from "@material-ui/core";
import { Link } from "react-router-dom";
import DrawerComponent from "./Drawer";
const useStyles = makeStyles((theme) => ({
navbar: {
position: 'fixed',
top: 0,
left: 0,
right: 0,
zindex: 1071,
backgroundColor: 'rgba(255, 255, 255, 0.7);'
},
navlinks: {
marginLeft: theme.spacing(5),
display: "flex",
},
logo: {
flexGrow: "1",
cursor: "pointer",
},
link: {
textDecoration: "none",
color: "black",
fontSize: "20px",
marginLeft: theme.spacing(5),
"&:hover": {
color: "orange",
borderBottom: "1px solid white",
},
},
}));
function Navbar() {
const classes = useStyles();
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
return (
<div>
<AppBar position="fixed">
<CssBaseline />
<Toolbar className={classes.navbar}>
<Typography className={classes.logo}>
<Link to="/" style={{ fontSize: "32px", textDecoration: "none", color: "Black", fontWeight: "600" }}>
Productivity App
</Link>
</Typography>
{isMobile ? (
<DrawerComponent />
) : (
<div className={classes.navlinks}>
<Link to="/" className={classes.link}>
Home
</Link>
<Link to="/dashboard" className={classes.link}>
Dashboard
</Link>
<Link to="/contact" className={classes.link}>
Contact
</Link>
<Link to="/login" className={classes.link}>
Login
</Link>
</div>
)}
</Toolbar>
</AppBar>
</div>
);
}
export default Navbar;