Add shortcut description to right click + add Suppr shortcut + Fix next selection after deletion

This commit is contained in:
Eric NGUYEN 2022-10-04 16:51:24 +02:00
parent 4e3c5d71fd
commit d580890b9d
6 changed files with 87 additions and 9 deletions

View file

@ -16,6 +16,9 @@ export interface IMenuAction {
/** title to show on hover */
title?: string
/** description of the shortcut */
shortcut?: string
/** function to be called on button click */
action: (target: HTMLElement) => void
}
@ -101,6 +104,7 @@ export function Menu(props: IMenuProps): JSX.Element {
className={'contextmenu-item'}
text={action.text}
title={action.title}
shortcut={action.shortcut}
onClick={() => action.action(target)} />);
});
};