Browse Source

Merge 525a611db8 into becaabfa0f

pull/10495/merge
eliakuestner 1 day ago committed by GitHub
parent
commit
4b6efb0350
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 35
      packages/excalidraw/components/HelpButton.tsx
  2. 286
      packages/excalidraw/components/icons.tsx

35
packages/excalidraw/components/HelpButton.tsx

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
import { t } from "../i18n";
import { HelpIcon } from "./icons";
import { HelpIcon, santaHatIcon } from "./icons";
type HelpButtonProps = {
name?: string;
@ -8,14 +7,24 @@ type HelpButtonProps = { @@ -8,14 +7,24 @@ type HelpButtonProps = {
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>
);
export const HelpButton = (props: HelpButtonProps) => {
const today = new Date();
const month = today.getMonth(); // 0 = Januar, 11 = Dezember
const date = today.getDate();
// nur vom 1.12 bis 26.12. anzeigen
const showSantaHat = month === 11 && date >= 1 && date <= 26;
return (
<button
className="help-icon"
onClick={props.onClick}
type="button"
title={`${t("helpDialog.title")} — ?`}
aria-label={t("helpDialog.title")}
>
{showSantaHat && santaHatIcon}
{HelpIcon}
</button>
);
};

286
packages/excalidraw/components/icons.tsx

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save