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 RedoIcon from "../../../icons/RedoIcon";
import { isMacLike } from "../../../helpers/shared";
function RedoButton({ onClick, disabled }) {
return (
<IconButton onClick={onClick} disabled={disabled}>
<IconButton
title={`Redo (${isMacLike ? "Cmd" : "Ctrl"} + Shift + Z)`}
aria-label={`Redo (${isMacLike ? "Cmd" : "Ctrl"} + Shift + Z)`}
onClick={onClick}
disabled={disabled}
>
<RedoIcon />
</IconButton>
);