From 190020753bc0333fb85686a3f6f5d3839b4fda77 Mon Sep 17 00:00:00 2001 From: uttiya10 <56562649+uttiya10@users.noreply.github.com> Date: Wed, 12 Jan 2022 15:57:55 -0500 Subject: [PATCH 01/88] Added Context Menu Handlers For ToolBar Button and Dropdown --- app/src/ui/lib/button.tsx | 21 ++++++++++++++++++++- app/src/ui/toolbar/button.tsx | 14 ++++++++++++++ app/src/ui/toolbar/dropdown.tsx | 16 +++++++++++++++- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/app/src/ui/lib/button.tsx b/app/src/ui/lib/button.tsx index 4e7f21409f..0cb7b53f16 100644 --- a/app/src/ui/lib/button.tsx +++ b/app/src/ui/lib/button.tsx @@ -8,10 +8,18 @@ export interface IButtonProps { * A callback which is invoked when the button is clicked * using a pointer device or keyboard. The source event is * passed along and can be used to prevent the default action - * or stop the even from bubbling. + * or stop the event from bubbling. */ readonly onClick?: (event: React.MouseEvent) => void + /** + * A callback which is invoked when the button's context menu + * is activated using a pointer device or keyboard. The source + * event is passed along and can be used to prevent the default + * action or stop the event from bubbling. + */ + readonly onContextMenu?: (event: React.MouseEvent) => void + /** * A function that's called when the user moves over the button with * a pointer device. @@ -118,6 +126,7 @@ export class Button extends React.Component {