useMenu
Introduction
The useMenu
hook is used internally to maintain the status of menu. The state of any opened menu is controlled through this hook. You can use this to implement a menu.
Property | Type | Description | Optional |
---|---|---|---|
menuAnchor | HTMLElement | null | The element to which the menu is anchored. | ✔️ |
openMenu | React.MouseEventHandler<HTMLElement> | Function to open the menu on a click event. | |
closeMenu | ZeroArgVoidReturns | Function to close the menu. |
Reference
For reference checkout this file