feat: Custom actions and shortcuts
This commit is contained in:
@@ -26,6 +26,7 @@ type ToolButtonBaseProps = {
|
||||
selected?: boolean;
|
||||
className?: string;
|
||||
isLoading?: boolean;
|
||||
onContextMenu?(event: React.MouseEvent, source: string): void;
|
||||
};
|
||||
|
||||
type ToolButtonProps =
|
||||
@@ -157,6 +158,11 @@ export const ToolButton = React.forwardRef((props: ToolButtonProps, ref) => {
|
||||
lastPointerTypeRef.current = null;
|
||||
});
|
||||
}}
|
||||
onContextMenu={(event) => {
|
||||
if (props.onContextMenu !== undefined) {
|
||||
props.onContextMenu(event, props.name ?? "");
|
||||
}
|
||||
}}
|
||||
>
|
||||
<input
|
||||
className={`ToolIcon_type_radio ${sizeCn}`}
|
||||
|
||||
Reference in New Issue
Block a user