Skip to content

Commit ee66051

Browse files
committed
Improve coloring of NavMenu and move to one line
1 parent 97531ea commit ee66051

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

apps/contract-verification/src/app/components/NavMenu.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,23 @@ interface NavItemProps {
99

1010
const NavItem: React.FC<NavItemProps> = ({ to, icon, title }) => {
1111
return (
12-
<NavLink
13-
// data-id="home"
14-
to={to}
15-
className={({ isActive }) => 'p-2 text-decoration-none ' + (isActive ? 'bg-primary text-white' : 'bg-secondary')}
16-
// state={from}
17-
>
18-
<span className="d-flex flex-column align-items-center justify-content-center" style={{ width: '60px' }}>
12+
<NavLink to={to} className={({ isActive }) => 'text-decoration-none d-flex flex-column justify-content-center px-2 ' + (isActive ? 'bg-transparent' : 'bg-dark')}>
13+
<span>
1914
<span>{icon}</span>
20-
<span>{title}</span>
15+
<span className="ml-2">{title}</span>
2116
</span>
2217
</NavLink>
2318
)
2419
}
2520

2621
export const NavMenu = () => {
2722
return (
28-
<nav className="d-flex flex-row justify-content-around bg-secondary fixed-top">
23+
<nav className="d-flex flex-row justify-start fixed-top w-100" style={{ height: '40px' }}>
2924
<NavItem to="/" icon={<i className="fas fa-home"></i>} title="Verify" />
3025
<NavItem to="/receipts" icon={<i className="fas fa-receipt"></i>} title="Receipts" />
3126
<NavItem to="/lookup" icon={<i className="fas fa-search"></i>} title="Lookup" />
3227
<NavItem to="/settings" icon={<i className="fas fa-cog"></i>} title="Settings" />
28+
<div className="flex-grow-1 bg-dark"></div>
3329
</nav>
3430
)
3531
}

apps/contract-verification/src/app/layouts/Default.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const DefaultLayout = ({ children, title, description }: PropsWithChildre
1212
return (
1313
<div>
1414
<NavMenu />
15-
<div className="my-4 px-3">
15+
<div className="py-4 px-3" style={{ marginTop: '40px' }}>
1616
<div>
1717
<p className="text-center" style={{ fontSize: '0.8rem' }}>
1818
{description}

0 commit comments

Comments
 (0)