Refactor: Modify fewer components.

This commit is contained in:
Daniel J. Geiger 2023-02-01 21:25:04 -06:00
parent 7246a6b17a
commit 1089cdb278
4 changed files with 64 additions and 59 deletions

View file

@ -43,7 +43,6 @@ type ToolButtonProps =
type: "icon";
children?: React.ReactNode;
onClick?(): void;
onContextMenu?: React.MouseEventHandler;
})
| (ToolButtonBaseProps & {
type: "radio";
@ -121,7 +120,6 @@ export const ToolButton = React.forwardRef((props: ToolButtonProps, ref) => {
aria-label={props["aria-label"]}
type={type}
onClick={onClick}
onContextMenu={props.type === "icon" ? props.onContextMenu : undefined}
ref={innerRef}
disabled={isLoading || props.isLoading}
>