Added keyboard shortcuts hints to map controls

This commit is contained in:
Mitchell McCaffrey
2020-10-17 09:37:39 +11:00
parent 339bda47e2
commit 0235bdb7ef
10 changed files with 53 additions and 27 deletions

View File

@@ -3,9 +3,16 @@ import { IconButton } from "theme-ui";
import UndoIcon from "../../../icons/UndoIcon";
import { isMacLike } from "../../../helpers/shared";
function UndoButton({ onClick, disabled }) {
return (
<IconButton onClick={onClick} disabled={disabled}>
<IconButton
title={`Undo (${isMacLike ? "Cmd" : "Ctrl"} + Z)`}
aria-label={`Undo (${isMacLike ? "Cmd" : "Ctrl"} + Z)`}
onClick={onClick}
disabled={disabled}
>
<UndoIcon />
</IconButton>
);