File tree Expand file tree Collapse file tree 3 files changed +41
-17
lines changed Expand file tree Collapse file tree 3 files changed +41
-17
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import {withRouter} from "react-router-dom";
33import React from 'react' ;
44import "../../node_modules/bootstrap/dist/css/bootstrap.min.css" ;
55import "../style/Navbar.css" ;
6-
6+ import { NavLink } from 'react-router-dom' ;
77
88class Navbar extends React . Component {
99 search ( ) {
@@ -41,19 +41,20 @@ class Navbar extends React.Component{
4141 < div className = "collapse navbar-collapse" id = "navbarSupportedContent" >
4242 < ul className = "navbar-nav me-auto mb-2 mb-lg-0" >
4343 < li className = "nav-item" >
44- < Link className = "nav-link" to = "/" >
44+ < NavLink exact to = "/" className = "nav-link"
45+ activeClassName = "main-nav-active" >
4546 Home
46- </ Link >
47+ </ NavLink >
4748 </ li >
4849 < li className = "nav-item" >
49- < Link className = "nav-link" to = "/Signup ">
50+ < NavLink exact to = "/Signup" className = "nav-link" activeClassName = "main-nav-active ">
5051 SignUp
51- </ Link >
52+ </ NavLink >
5253 </ li >
5354 < li className = "nav-item" >
54- < Link className = "nav-link" to = "/login ">
55+ < NavLink exact to = "/login" className = "nav-link" activeClassName = "main-nav-active ">
5556 Login
56- </ Link >
57+ </ NavLink >
5758 </ li >
5859
5960 </ ul >
Original file line number Diff line number Diff line change 1010.nav-item {
1111 margin-left : 20px ;
1212}
13+ .navbar-search-btn {
14+ float : left !important ;
15+ margin-left : 0 !important ;
16+ margin-top : 0 !important ;
17+ height : 38px !important ;
18+ box-shadow : none !important ;
19+ }
1320.navbar-nav .nav-item .nav-link {
1421 font-size : 20px ;
1522 font-weight : 700 ;
23+ width : 100px ;
1624 text-transform : uppercase;
1725 color : # 3ed9fa ;
26+ background-color : # 111 ;
27+ border-radius : 50px ;
28+ color : # e0e0e0 !important ;
1829}
1930
2031.navbar-nav .nav-item .nav-link : hover {
21- background-color : white !important ;
22- color : black !important ;
32+ width : 100px ;
33+ color : # e0e0e0 !important ;
34+ border-radius : 50px ;
35+ background : # ff3547 ;
2336}
37+ .main-nav-active {
38+ width : 100px ;
39+ background : # ff3547 !important ;
40+ border-radius : 50px ;
2441
25- .navbar-search-btn {
26- float : left !important ;
27- margin-left : 0 !important ;
28- margin-top : 0 !important ;
29- height : 38px !important ;
30- box-shadow : none !important ;
3142}
Original file line number Diff line number Diff line change 1313.navbar-nav .nav-item .nav-link {
1414 font-size : 20px ;
1515 font-weight : 700 ;
16+ width : 100px ;
1617 text-transform : uppercase;
1718 color : # 3ed9fa ;
19+ background-color : # 111 ;
20+ border-radius : 50px ;
21+ color : # e0e0e0 !important ;
1822}
1923
2024.navbar-nav .nav-item .nav-link : hover {
21- background-color : white;
22- color : black !important ;
25+ width : 100px ;
26+ color : # e0e0e0 !important ;
27+ border-radius : 50px ;
28+ background : # ff3547 ;
29+ }
30+
31+ .main-nav-active {
32+ width : 100px ;
33+ border-radius : 50px ;
34+ background : # ff3547 !important ;
2335}
You can’t perform that action at this time.
0 commit comments