fix: provide HelpButton title prop (#6209)

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Omar Brikaa 2023-03-03 14:50:18 +02:00 committed by GitHub
parent 5c0b15ce2b
commit 34a7d48b95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
import { t } from "../i18n";
import { HelpIcon } from "./icons";
type HelpButtonProps = {
title?: string;
name?: string;
id?: string;
onClick?(): void;
@ -12,8 +12,8 @@ export const HelpButton = (props: HelpButtonProps) => (
className="help-icon"
onClick={props.onClick}
type="button"
title={`${props.title} — ?`}
aria-label={props.title}
title={`${t("helpDialog.title")} — ?`}
aria-label={t("helpDialog.title")}
>
{HelpIcon}
</button>