Skip to content

Commit ac16f27

Browse files
component(navigation)(MS1): add mobile navigation icon
1 parent 87625b5 commit ac16f27

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
.LINKS {
1+
/* Desktop and Mobile Navigation links */
2+
.DESKTOP-LINKS {
23
@apply font-semibold rounded-2xl bg-white/20 shadow-lg ring-2 ring-black/10 px-3 py-4;
34
}
4-
.LINKS-ACTIVE {
5+
.DESKTOP-LINKS-ACTIVE {
56
@apply text-black rounded-xl shadow-lg border-1 p-3;
67
}
8+
.MOBILE-LINKS {
9+
@apply font-semibold rounded-xl bg-white/20 shadow-lg ring-2 ring-black/10 p-3;
10+
}
711

12+
/* Button */
813
.BUTTON {
914
@apply font-semibold rounded-2xl bg-white shadow-lg ring-2 px-4 py-4;
1015
}

client/src/components/General/NavigationBar/NavigationBar.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react';
22
import { NavLink, Link } from 'react-router-dom';
33

4+
// ICONS
5+
import { HiMenuAlt3 } from 'react-icons/hi';
46
// UTILS
57
import Logo from '../../../utils/Logo/Logo';
68
// DATA
@@ -10,15 +12,16 @@ const NavigationBar: React.FC = () => {
1012
return (
1113
<div className="w-full h-[9vh] BG-BLACK-PRIMARY FLEX-BETWEEN PADDING">
1214
<Logo className="font-style-logo text-4xl TEXT-WHITE-PRIMARY" />
13-
<div className="RESPONSIVE-CENTER-BLOCK gap-4">
14-
<div className="LINKS">
15+
{/* Desktop Navigation Bar */}
16+
<div className="hidden FLEX-CENTER-LG gap-4">
17+
<div className="DESKTOP-LINKS">
1518
<ul className="TEXT-COLOR-PRIMARY FLEX-CENTER gap-6">
1619
{NAVIGATION_LINKS.map(({ name, path }, id) => (
1720
<li key={id} className="GRAY-300 TEXT-WHITE-PRIMARY-HOVER">
1821
<NavLink
1922
to={path}
2023
className={({ isActive }) =>
21-
isActive ? 'LINKS-ACTIVE BG-WHITE-PRIMARY' : ''
24+
isActive ? 'DESKTOP-LINKS-ACTIVE BG-WHITE-PRIMARY' : ''
2225
}
2326
>
2427
{name}
@@ -31,6 +34,10 @@ const NavigationBar: React.FC = () => {
3134
Contract
3235
</Link>
3336
</div>
37+
{/* Mobile Navigation Bar */}
38+
<div className="lg:hidden MOBILE-LINKS POINTER">
39+
<HiMenuAlt3 size={20} className="TEXT-WHITE-PRIMARY" />
40+
</div>
3441
</div>
3542
);
3643
};

client/src/global.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@
2727
.FLEX-CENTER {
2828
@apply flex items-center justify-center;
2929
}
30+
.FLEX-CENTER-LG {
31+
@apply lg:flex items-center justify-center;
32+
}
3033
.FLEX-BETWEEN {
3134
@apply flex items-center justify-between;
3235
}
36+
.FLEX-END {
37+
@apply flex items-center justify-end;
38+
}
3339

3440
.PADDING {
3541
@apply px-5;
@@ -38,8 +44,3 @@
3844
.POINTER {
3945
@apply hover:cursor-pointer;
4046
}
41-
42-
/* RESPONSIVE */
43-
.RESPONSIVE-CENTER-BLOCK {
44-
@apply hidden lg:flex items-center justify-center;
45-
}

0 commit comments

Comments
 (0)