11import React , { Component } from "react" ;
22import { withStyles } from "@material-ui/styles" ;
3+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
4+ import {
5+ faHome ,
6+ faHeadSideCough ,
7+ faFlask ,
8+ faQuestionCircle ,
9+ } from "@fortawesome/free-solid-svg-icons" ;
10+ import colors from "../colors" ;
11+ import classNames from "classnames" ;
312
413const styles = {
514 nav : {
@@ -9,21 +18,76 @@ const styles = {
918 listStyle : "none" ,
1019 } ,
1120 navLinks : {
12- marginBottom : "7rem " ,
21+ marginBottom : "5rem " ,
1322 fontWeight : "500" ,
1423 } ,
24+ iconBox : {
25+ display : "flex" ,
26+ flexDirection : "column" ,
27+ justifyContent : "center" ,
28+ alignItems : "center" ,
29+ position : "relative" ,
30+ zIndex : "50" ,
31+ } ,
32+ icons : {
33+ fontSize : "2.5rem" ,
34+ padding : "1rem 0" ,
35+ } ,
36+ active : {
37+ color : colors . purple ,
38+ position : "relative" ,
39+ zIndex : "10" ,
40+
41+ "&::before" : {
42+ content : '""' ,
43+ position : "absolute" ,
44+ width : "165%" ,
45+ height : "110%" ,
46+ display : "block" ,
47+ backgroundColor : "rgb(245, 245, 245)" ,
48+ transform : "translateX(-1rem) skewX(10deg)" ,
49+ borderRadius : "25px" ,
50+ } ,
51+ } ,
1552} ;
1653
1754class Navbar extends Component {
1855 render ( ) {
1956 const { classes } = this . props ;
57+ const activeClasses = classNames ( classes . navLinks , classes . active ) ;
2058 return (
2159 < nav className = { classes . nav } >
2260 < ul className = { classes . navItems } >
23- < li className = { classes . navLinks } > Overview</ li >
24- < li className = { classes . navLinks } > Symptoms</ li >
25- < li className = { classes . navLinks } > Test Yourself</ li >
26- < li className = { classes . navLinks } > Help</ li >
61+ < li className = { activeClasses } >
62+ < div className = { classes . iconBox } >
63+ < FontAwesomeIcon icon = { faHome } className = { classes . icons } />
64+ Overview
65+ </ div >
66+ </ li >
67+ < li className = { classes . navLinks } >
68+ < div className = { classes . iconBox } >
69+ < FontAwesomeIcon
70+ icon = { faHeadSideCough }
71+ className = { classes . icons }
72+ />
73+ Symptoms
74+ </ div >
75+ </ li >
76+ < li className = { classes . navLinks } >
77+ < div className = { classes . iconBox } >
78+ < FontAwesomeIcon icon = { faFlask } className = { classes . icons } />
79+ Test Yourself
80+ </ div >
81+ </ li >
82+ < li className = { classes . navLinks } >
83+ < div className = { classes . iconBox } >
84+ < FontAwesomeIcon
85+ icon = { faQuestionCircle }
86+ className = { classes . icons }
87+ />
88+ Help
89+ </ div >
90+ </ li >
2791 </ ul >
2892 </ nav >
2993 ) ;
0 commit comments