Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,20 @@ const DropdownItem = ({
);
};

let heightOffset = headerHeight;
if (buttons.length > 0) {
const ctaButtonRowHeight = 64;
heightOffset += ctaButtonRowHeight;
}

Comment thread
mlsamuelson marked this conversation as resolved.
return (
<DropdownWrapper
ref={dropdownRef}
className={`${classes}${alignedRight ? " aligned-right" : ""}${
isMega ? " mega" : ""
}`}
breakpoint={breakpoint}
headerHeight={headerHeight}
heightOffset={heightOffset}
>
<div
style={{ "--cols": cols < 3 ? 4 : cols }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@ const DropdownWrapper = styled.div`
/*
max-height is calculated from
100% view Height
minus header
minus offset
minus 2rem padding
minus 4rem cta buttons - future we could add a ref to measure if needed
*/
max-height: calc(
100vh - ${({ headerHeight }) => headerHeight}px - 2rem - 4rem
);
max-height: calc(100vh - ${({ heightOffset }) => heightOffset}px - 2rem);
overflow-y: auto;
overflow-x: hidden;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ const NavbarContainer = () => {
return (
// @ts-ignore
<Wrapper breakpoint={breakpoint} data-testid="navigation" aria-label="Site">
{(navTree?.length || mobileNavTree?.length || buttons?.length) && (
{Boolean(navTree.length || mobileNavTree.length || buttons.length) && (
Comment thread
mlsamuelson marked this conversation as resolved.
<div className={CLASS_NAMES.CONTENT_CONTAINER}>
{(navTree?.length || mobileNavTree?.length) && (
{Boolean(navTree?.length || mobileNavTree?.length) && (
<ul className={CLASS_NAMES.NAV_LIST}>
{!!mobileNavTree?.length && isMobile
? mobileNavTree?.map((link, i) => renderItem(link, i))
: navTree?.map((link, i) => renderItem(link, i))}
</ul>
)}
{!!buttons?.length && (
{Boolean(buttons?.length) && (
<form
className={CLASS_NAMES.BUTTONS_CONTAINER}
data-testid="buttons-container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Wrapper = styled.nav`
overflow-y: auto;
min-height: 0;
> *:last-child {
margin-bottom: min(75px, 15vw);
margin-bottom: 1rem;
Comment thread
mlsamuelson marked this conversation as resolved.
}
}
.${CLASS_NAMES.NAV_LIST} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const HeaderMainWrapper = styled.div`
"search search search"
"nav nav nav";

height: calc(100dvh - ${({ headerTop }) => headerTop}px);
max-height: calc(100dvh - ${({ headerTop }) => headerTop}px);
overflow: hidden;
Comment thread
mlsamuelson marked this conversation as resolved.
.${CLASS_NAMES.PARTNER_TITLE}, .navbar-brand {
grid-area: logo;
Expand Down
Loading