Skip to content

Commit

Permalink
shortened the divider line and lengthened the border
Browse files Browse the repository at this point in the history
  • Loading branch information
jenbreese committed Apr 3, 2024
1 parent 820af18 commit 6b35b2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .storybook/stories/menu/MainMenu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ export const MainMenuComponent: Story = {
...defaultMenuProps,
children: [
{id: "8", title: "First Item", url: "#", ...defaultMenuProps},
{id: "9", title: "Second Item", url: "#", ...defaultMenuProps},
{
id: "9",
title: "More Second Items!",
url: "#",
...defaultMenuProps,
children: [
{id: "8", title: "First Item", url: "#", ...defaultMenuProps},
{id: "9", title: "Second Item", url: "#", ...defaultMenuProps},
{id: "10", title: "Third Item", url: "#", ...defaultMenuProps},
]
},
{id: "10", title: "Third Item", url: "#", ...defaultMenuProps},
]
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/menu/main-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {useBoolean, useEventListener} from "usehooks-ts";
import {useCallback, useEffect, useId, useLayoutEffect, useRef, useState} from "react";
import {usePathname} from "next/navigation";

const menuLevelsToShow = 2;
const menuLevelsToShow = 4;

type Props = {
/**
Expand Down Expand Up @@ -143,7 +143,7 @@ const MenuItem = ({id, url, title, activeTrail, children, level}: MenuItemProps)
return (
<li
ref={menuItemRef}
className={clsx("m-0 py-2 lg:py-0 relative border-b first:border-t last:border-0 border-cool-grey lg:border-black-20 lg:relative lg:mr-5 last:lg:mr-0", {"lg:border-b-0 first:border-t-0": level === 0})}
className={clsx("m-0 py-2 lg:py-0 relative border-b first:border-t last:border-0 border-cool-grey lg:border-black-20 lg:relative lg:pr-5 last:lg:mr-0", {"lg:border-b-0 first:border-t-0": level === 0})}
>
<div className="flex items-center justify-between lg:justify-end">
<Link
Expand All @@ -157,7 +157,7 @@ const MenuItem = ({id, url, title, activeTrail, children, level}: MenuItemProps)

{(children.length > 0 && level < menuLevelsToShow) &&
<>
{level === 0 && <div className="block ml-5 w-[1px] h-[25px] mb-[6px] bg-archway-light shrink-0"/>}
{level === 0 && <div className="block ml-5 w-[1px] h-[20px] mb-[6px] bg-archway-light shrink-0"/>}
<button
ref={buttonRef}
className="shrink-0 relative right-10 lg:right-0 text-white lg:text-digital-red bg-digital-red lg:bg-transparent rounded-full lg:rounded-none group border-b border-transparent hocus:border-black hocus:bg-white"
Expand Down

0 comments on commit 6b35b2f

Please sign in to comment.