Menu
Reference
- The
Menucomponent is display dropdown menu.
Props
-
menuComponent- Type:
ReactNode - Description: The content to display inside the menu.
- Type:
-
open- Type:
boolean - Description: Controls the visibility of the menu. If
false, the menu is not rendered.
- Type:
Usage Example
function Example(pageContext) {
const { protrakComponents } = React.useContext(customWidgetContext);
const { Menu } = protrakComponents;
return(
<Menu
open={true}
menuComponent={<div>Menu Content</div>}
/>
);
}
- This renders a dropdown menu with the content "Menu Content" when
openistrue.