From b32d61053274dd1f639103f6eb8959e9e5775e34 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 22 Jun 2023 11:51:38 -0700 Subject: [PATCH] Adds collapsible feature to bookmarks --- src/components/bookmarks/group.jsx | 38 ++++++++++++++++++++++++++---- src/pages/index.jsx | 5 +++- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/components/bookmarks/group.jsx b/src/components/bookmarks/group.jsx index 2910245c3..ef0a5ab8f 100644 --- a/src/components/bookmarks/group.jsx +++ b/src/components/bookmarks/group.jsx @@ -1,13 +1,41 @@ +import classNames from "classnames"; +import { Disclosure, Transition } from '@headlessui/react'; +import { MdKeyboardArrowDown } from "react-icons/md"; + import ErrorBoundary from "components/errorboundry"; import List from "components/bookmarks/list"; -export default function BookmarksGroup({ group }) { +export default function BookmarksGroup({ group, disableCollapse }) { return (
-

{group.name}

- - - + + {({ open }) => ( + <> + +

{group.name}

+ +
+ + + + + + + + + )} +
); } diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 5106e07cc..a2993b1aa 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -308,7 +308,10 @@ function Home({ initialSettings }) { {bookmarks?.length > 0 && (
{bookmarks.map((group) => ( - + ))}
)}