excalidraw/src/components/HelpButton.tsx
Omar Brikaa 34a7d48b95
fix: provide HelpButton title prop (#6209)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-03-03 12:50:18 +00:00

21 lines
403 B
TypeScript

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>
);