import React, { useRef, useState } from "react"; import styles from "./Menu.module.css"; import { useMenu, useMenuItem } from "@react-aria/menu"; import { useTreeState } from "@react-stately/tree"; import { mergeProps } from "@react-aria/utils"; import { useFocus } from "@react-aria/interactions"; import classNames from "classnames"; export function Menu({ className, onAction, ...rest }) { const state = useTreeState({ ...rest, selectionMode: "none" }); const menuRef = useRef(); const { menuProps } = useMenu(rest, state, menuRef); return (