diff --git a/.vscode/launch.json b/.vscode/launch.json index 0e71c3ba1..366b54388 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -16,4 +16,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/components/bookmarks/group.jsx b/src/components/bookmarks/group.jsx index 97a484e9c..4cd36b7b8 100644 --- a/src/components/bookmarks/group.jsx +++ b/src/components/bookmarks/group.jsx @@ -5,44 +5,64 @@ import { MdKeyboardArrowDown } from "react-icons/md"; import ErrorBoundary from "components/errorboundry"; import List from "components/bookmarks/list"; +import ResolvedIcon from "components/resolvedicon"; -export default function BookmarksGroup({ group, disableCollapse }) { +export default function BookmarksGroup({ bookmarks, layout, disableCollapse }) { const panel = useRef(); return ( -
- - {({ open }) => ( - <> - -

{group.name}

- -
- { - panel.current.style.height = `${panel.current.scrollHeight}px`; - setTimeout(() => {panel.current.style.height = `0`}, 1); - }} - beforeEnter={() => { - panel.current.style.height = `0px`; - setTimeout(() => {panel.current.style.height = `${panel.current.scrollHeight}px`}, 1); - }} - > - - - - - - - - )} -
+
+ + {({ open }) => ( + <> + {layout?.header !== false && ( + + {layout?.icon && ( +
+ +
+ )} +

{bookmarks.name}

+ +
+ )} + { + panel.current.style.height = `${panel.current.scrollHeight}px`; + setTimeout(() => { + panel.current.style.height = `0`; + }, 1); + }} + beforeEnter={() => { + panel.current.style.height = `0px`; + setTimeout(() => { + panel.current.style.height = `${panel.current.scrollHeight}px`; + }, 1); + }} + > + + + + + + + + )} +
); } diff --git a/src/components/bookmarks/list.jsx b/src/components/bookmarks/list.jsx index d37b83e79..e0266d303 100644 --- a/src/components/bookmarks/list.jsx +++ b/src/components/bookmarks/list.jsx @@ -1,8 +1,17 @@ +import classNames from "classnames"; + +import { columnMap } from "../../utils/layout/columns"; + import Item from "components/bookmarks/item"; -export default function List({ bookmarks }) { +export default function List({ bookmarks, layout }) { return ( -