mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Some checks failed
Auto release excalidraw next / Auto-release-excalidraw-next (push) Failing after 2m36s
Build Docker image / build-docker (push) Failing after 6s
Cancel previous runs / cancel (push) Failing after 1s
Publish Docker / publish-docker (push) Failing after 31s
New Sentry production release / sentry (push) Failing after 2m3s
34 lines
826 B
TypeScript
34 lines
826 B
TypeScript
import clsx from "clsx";
|
|
|
|
import { KEYS } from "@excalidraw/common";
|
|
|
|
import { ToolButton } from "./ToolButton";
|
|
import { handIcon } from "./icons";
|
|
|
|
import "./ToolIcon.scss";
|
|
|
|
type LockIconProps = {
|
|
title?: string;
|
|
name?: string;
|
|
checked: boolean;
|
|
onChange?(): void;
|
|
isMobile?: boolean;
|
|
};
|
|
|
|
export const HandButton = (props: LockIconProps) => {
|
|
return (
|
|
<ToolButton
|
|
className={clsx("Shape", { fillable: false })}
|
|
type="radio"
|
|
icon={handIcon}
|
|
name="editor-current-shape"
|
|
checked={props.checked}
|
|
title={`${props.title} — H`}
|
|
keyBindingLabel={!props.isMobile ? KEYS.H.toLocaleUpperCase() : undefined}
|
|
aria-label={`${props.title} — H`}
|
|
aria-keyshortcuts={KEYS.H}
|
|
data-testid={`toolbar-hand`}
|
|
onChange={() => props.onChange?.()}
|
|
/>
|
|
);
|
|
};
|