summaryrefslogtreecommitdiffstats
path: root/packages/excalidraw/components/HelpButton.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/excalidraw/components/HelpButton.tsx')
-rw-r--r--packages/excalidraw/components/HelpButton.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/excalidraw/components/HelpButton.tsx b/packages/excalidraw/components/HelpButton.tsx
new file mode 100644
index 0000000..ce38724
--- /dev/null
+++ b/packages/excalidraw/components/HelpButton.tsx
@@ -0,0 +1,20 @@
+import { t } from "../i18n";
+import { HelpIcon } from "./icons";
+
+type HelpButtonProps = {
+ name?: string;
+ id?: string;
+ onClick?(): void;
+};
+
+export const HelpButton = (props: HelpButtonProps) => (
+ <button
+ className="help-icon"
+ onClick={props.onClick}
+ type="button"
+ title={`${t("helpDialog.title")} — ?`}
+ aria-label={t("helpDialog.title")}
+ >
+ {HelpIcon}
+ </button>
+);