import { useState } from 'react'; import { Icon, Text, TooltipPopup } from 'react-basics'; import classNames from 'classnames'; import { useRouter } from 'next/router'; import Link from 'next/link'; import Icons from 'components/icons'; import styles from './NavGroup.module.css'; export function NavGroup({ title, items, defaultExpanded = true, allowExpand = true, minimized = false, }) { const { pathname } = useRouter(); const [expanded, setExpanded] = useState(defaultExpanded); const handleExpand = () => setExpanded(state => !state); return (
{title && (
{title}
)}
{items.map(({ label, url, icon, divider }) => { return ( {icon} {label} ); })}
); } export default NavGroup;