import React, { FC, MouseEvent } from 'react'; export interface MenuProps { /** * Component to which the menu will be anchored */ anchor?: React.ReactNode; /** * An array of params that will be passed to the `handleClick` method of each menu item. */ handleClickParams?: (string | number)[]; /** * The id of the menu. */ id: string; /** * The list of choices to present. It must be an array of objects with the following properties: * * * `handleClick`: A function that will be executed on item's `onClick` method, * e.g. `(e) => console.log(e)`. By default, `e`, the React's synthetic event, is passed to that * function. When additional parameters are passed by another API implementation, e.g. `Table`, * it is explicitly documented. * * `icon`: If set, an icon is showed before text. * * `text`: Item's text. */ items: MenuItemType[]; /** * How the menu will be displayed with regards to the anchor. Check * [here](https://material-ui.com/components/popper/#positioned-popper) for positioning. */ placement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top'; } export interface MenuItemType { /** * A function that will be executed on item's `onClick` method, * e.g. `(e) => console.log(e)`. By default, `e`, the React's synthetic event, is passed to that * function. When additional parameters are passed by another API implementation, e.g. `Table`, * it is explicitly documented. */ handleClick?: (event: MouseEvent, x?: string) => void; /** * If set, an icon is showed before text. */ icon?: React.ReactElement; /** * Item's text. */ text: string; } /** * `Menu` appears upon interaction with an element (such as an icon or button) or when * users perform a specific action.' For its implementation, Matte uses * [Popper](https://material-ui.com/components/popper/) with * [MenuList](https://material-ui.com/api/menu-list/#menulist-api) and * [material-ui-popup-state](https://github.com/jcoreio/material-ui-popup-state), to avoid scroll * freezing and provide custom placement. The closest to this implementation by Material UI can be found * [here](https://material-ui.com/components/menus/#customized-menus). */ export declare const Menu: FC;