import { useRef } from "react"; 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, 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); }} > )}
); }