-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathNavBar.tsx
68 lines (63 loc) · 1.48 KB
/
NavBar.tsx
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
import React from 'react';
import cn from 'classnames';
import { NavLink } from 'react-router-dom';
import {
ArrowReceiveSvg,
ArrowTransferSvg,
ClockSvg,
SummarySvg,
} from '../../assets';
interface NavItem {
to: string;
label: string;
icon: React.JSX.Element;
}
const navItems: NavItem[] = [
{
to: 'account-summary',
label: 'Account Summary',
icon: <SummarySvg />,
},
{
to: 'transfer-balance',
label: 'Transfer Balance',
icon: <ArrowTransferSvg />,
},
{
to: 'receive',
label: 'Receive',
icon: <ArrowReceiveSvg />,
}
];
function NavBar() {
return (
<nav className="flex space-x-9 mb-3 justify-center self-center items-center align-middle">
{navItems.map((item) => (
<NavLink
key={item.to}
to={item.to}
className={({ isActive }) =>
cn('text-sm text-[#0e0e0e] font-semibold leading-tight pb-3', {
'text-black border-b border-orange-500': isActive,
})
}
>
{({ isActive }) => (
<span
className={cn(
'inline-flex items-center hover:text-brand-orange navbar-link',
{ 'navbar-link-active': isActive },
)}
>
<span className="text-brand-grey10 text-sm mr-2">
{item.icon}
</span>
{item.label}
</span>
)}
</NavLink>
))}
</nav>
);
}
export default NavBar;