Skip to content

Commit

Permalink
feat: revamping the Navbar #1195
Browse files Browse the repository at this point in the history
  • Loading branch information
pranay911 committed Jan 21, 2024
1 parent d38015d commit 3f38589
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/components/Button/GlobalButton/Button.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.btn {
padding: 8px 15px;
padding: 8px 25px;
text-align: center;
cursor: pointer;
border-radius: 8px;
border-radius: 40px;
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
gap: 15px;
width: auto;
letter-spacing: 1px;
font-weight: 500;
Expand Down Expand Up @@ -75,4 +75,4 @@

.btn.bold {
font-weight: 600;
}
}
8 changes: 4 additions & 4 deletions src/components/Navbar/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@
text-decoration: none;
cursor: pointer;
font-family: Poppins, sans-serif;
color: #28183b;
color: #e26959;
font-size: 1rem;
}

.nav-item div:not(.active-link) {
border-bottom: 2px solid #e26959;
border-bottom: 2px solid #28183b;
width: 0%;
margin: auto;
transition: all 0.2s ease-in;
}

.nav-item:hover div {
border-bottom: 2px solid #e26959;
border-bottom: 2px solid #28183b;
width: 50%;
animation: all 0.5 infinite;
}

.active-link {
border-bottom: 2px solid #e26959;
border-bottom: 2px solid #28183b;
width: 50%;
margin: auto;
}
Expand Down
13 changes: 10 additions & 3 deletions src/components/Navbar/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Link, useNavigate, useLocation } from "react-router-dom";
import Cookies from "js-cookie";
import { FaBars } from "react-icons/fa";
import { IoMdClose } from "react-icons/io";
import { IoChevronForwardSharp } from "react-icons/io5";
import Button from "../Button/GlobalButton/Button";
import ClickAwayListener from "../../utils/ClickAwayListener";

Expand Down Expand Up @@ -127,14 +128,20 @@ const Navbar = () => {
) : (
<>
<Button
variant="outline"
variant="Primary"
to="/auth/login"
fontweight="bold"
>
Sign in
<span>
Contribute to Milan
<IoChevronForwardSharp style={{ marginLeft: "5px" }} />
</span>
</Button>
<Button to="/auth/signup" fontweight="bold" variant="solid">
Sign up
<span>
Sign Up
<IoChevronForwardSharp style={{ marginLeft: "5px" }} />
</span>
</Button>
</>
)}
Expand Down

0 comments on commit 3f38589

Please sign in to comment.