import { h } from 'preact'; import RelativeModal from './RelativeModal'; import { useCallback } from 'preact/hooks'; export default function Menu({ className, children, onDismiss, relativeTo, widthRelative }) { return relativeTo ? ( ) : null; } export function MenuItem({ focus, icon: Icon, label, href, onSelect, value, ...attrs }) { const handleClick = useCallback(() => { onSelect && onSelect(value, label); }, [onSelect, value, label]); const Element = href ? 'a' : 'div'; return ( {Icon ? (
) : null}
{label}
); } export function MenuSeparator() { return
; }