Skip to content

Commit

Permalink
Attempt to fix Sidebar Issues #120 item 2 - problem with scroll eleme…
Browse files Browse the repository at this point in the history
…nt hiding new popouts for large menu
  • Loading branch information
krowvin committed Oct 17, 2024
1 parent 737bec0 commit 4aa26b4
Show file tree
Hide file tree
Showing 3 changed files with 375 additions and 18 deletions.
27 changes: 26 additions & 1 deletion lib/composite/sidebar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { UsaceBox, PopoutMenu } from "../../../lib";
import { UsaceBox, PopoutMenu } from "../..";
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react";
import clsx from "clsx";
import { VscChevronRight } from "react-icons/vsc";
import { useIsMobile } from "../../hooks/useIsMobile";
import Dropdown from "../../components/form/dropdown";
Expand Down Expand Up @@ -28,6 +30,29 @@ function renderPopoutMenu(
level < MAX_NESTING_LEVEL - 1
) {
return (
// <Menu>
// <MenuButton>
// {({ active }) => (
// <button className={clsx(active && "bg-blue-200")}>
// {link.text}
// </button>
// )}
// </MenuButton>
// <MenuItems anchor="bottom">
// {/* {links.map((link) => ( */}
// <MenuItem key={link.href}>
// {({ focus }) => (
// <a
// className={clsx("block", focus && "bg-blue-100")}
// href={link.href}
// >
// {link.label}
// </a>
// )}
// </MenuItem>
// {/* ))} */}
// </MenuItems>
// </Menu>
<div
key={link.id}
className="gw-py-1 gw-border-b-[1px] hover:gw-bg-gray-100"
Expand Down
3 changes: 0 additions & 3 deletions src/app-pages/documentation/_docs-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ function DocsPage({ breadcrumbs = [], children }) {
title="Contents"
selectedPath={hash}
sidebarLinks={sidebarLinks}
onChange={(e) => {
doUpdateHash(e.target.value);
}}
/>
</div>
<div className="gw-col-span-12 md:gw-col-span-10">{children}</div>
Expand Down
Loading

0 comments on commit 4aa26b4

Please sign in to comment.