Skip to content

Commit 6db9fd5

Browse files
committed
Fix NavMenu for smaller screens
1 parent 22a80ec commit 6db9fd5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

apps/contract-verification/src/app/App.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
html, body, #root {
2+
height: 100%;
3+
}
4+
15
body {
26
margin: 0;
37
}

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

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

1010
const NavItem: React.FC<NavItemProps> = ({ to, icon, title }) => {
1111
return (
12-
<NavLink to={to} className={({ isActive }) => 'text-decoration-none d-flex flex-column justify-content-center px-2 ' + (isActive ? 'bg-light' : 'bg-transparent')}>
12+
<NavLink to={to} className={({ isActive }) => 'text-decoration-none d-flex flex-column justify-content-center p-2 small ' + (isActive ? 'bg-light' : 'bg-transparent')}>
1313
<span>
1414
<span>{icon}</span>
1515
<span className="ml-2">{title}</span>
@@ -20,7 +20,7 @@ const NavItem: React.FC<NavItemProps> = ({ to, icon, title }) => {
2020

2121
export const NavMenu = () => {
2222
return (
23-
<nav className="d-flex flex-row justify-start fixed-top w-100" style={{ height: '40px' }}>
23+
<nav className="d-flex flex-row justify-start w-100">
2424
<NavItem to="/" icon={<i className="fas fa-home"></i>} title="Verify" />
2525
<NavItem to="/receipts" icon={<i className="fas fa-receipt"></i>} title="Receipts" />
2626
<NavItem to="/lookup" icon={<i className="fas fa-search"></i>} title="Lookup" />

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ interface Props {
1010

1111
export const DefaultLayout = ({ children, title, description }: PropsWithChildren<Props>) => {
1212
return (
13-
<div>
13+
<div className="d-flex flex-column h-100">
1414
<NavMenu />
15-
<div className="py-4 px-3" style={{ marginTop: '40px' }}>
15+
<div className="py-4 px-3 flex-grow-1" style={{ overflowY: 'auto' }}>
1616
<div>
1717
<p className="text-center" style={{ fontSize: '0.8rem' }}>
1818
{description}

0 commit comments

Comments
 (0)