mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GraphNG: Context menu (#29745)
* Refactor Context menu and add Menu component to grafana/ui * ContextMenuPlugin WIP * Fix docs issues * Remove Add annotations menu item from graph context menu * ts ifx
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import React, { useState } from 'react';
|
||||
import { ContextMenu, ContextMenuGroup } from '../ContextMenu/ContextMenu';
|
||||
import { ContextMenu } from '../ContextMenu/ContextMenu';
|
||||
import { MenuItemsGroup } from '../Menu/Menu';
|
||||
|
||||
interface WithContextMenuProps {
|
||||
/** Menu item trigger that accepts openMenu prop */
|
||||
children: (props: { openMenu: React.MouseEventHandler<HTMLElement> }) => JSX.Element;
|
||||
/** A function that returns an array of menu items */
|
||||
getContextMenuItems: () => ContextMenuGroup[];
|
||||
getContextMenuItems: () => MenuItemsGroup[];
|
||||
}
|
||||
|
||||
export const WithContextMenu: React.FC<WithContextMenuProps> = ({ children, getContextMenuItems }) => {
|
||||
|
||||
Reference in New Issue
Block a user