import React from "react";
import { StatefulMenu as BaseStatefulMenu } from "baseui/menu";

export interface MenuProps {
  items: any[];
  onItemSelected?: (item: any) => void;
}

/**
 * This is the `<Menu>` component <br />
 * Use this to render a menu/context menu
 */
const Menu: React.FC<MenuProps> = (props) => {
  return (
    <BaseStatefulMenu items={props.items} onItemSelect={props.onItemSelected} />
  );
};

export default Menu;
