import { h } from 'preact'; import { useRef, useState } from 'preact/hooks'; import Menu from './Menu'; import { ArrowDropdown } from '../icons/ArrowDropdown'; import Heading from './Heading'; export default function MultiSelect({ className, title, options, selection, onToggle }) { const popupRef = useRef(null); const [state, setState] = useState({ showMenu: false, }); return (
setState({ showMenu: true })} >
{state.showMenu ? ( setState({ showMenu: false })}> {title} {options.map((item) => ( ))} ): null}
); }