diagram-js
Version:
A toolbox for displaying and modifying diagrams on the web
29 lines (27 loc) • 791 B
TypeScript
/**
* Compute the DOM `id` of a rendered popup menu entry.
*
* Used to wire the entry (`role="option"`) to the search field
* via `aria-activedescendant`.
*
* @param idPrefix
* @param entry
*
* @return
*/
export function getPopupMenuItemId(idPrefix: string, entry: PopupMenuEntry): string;
/**
* Component that renders a popup menu entry.
*
* @param props
*/
export default function PopupMenuItem(props: {
key: string;
idPrefix: string;
entry: PopupMenuEntry;
selected: boolean;
onMouseEnter: (event: MouseEvent) => void;
onMouseLeave: (event: MouseEvent) => void;
onAction: (event: MouseEvent, entry?: PopupMenuEntry, action?: string) => void;
}): import("preact").VNode<{}>;
type PopupMenuEntry = import("./PopupMenuProvider.js").PopupMenuEntry;