diff --git a/src/toasts/SetupEncryptionToast.ts b/src/toasts/SetupEncryptionToast.ts index 2545aa6ff23..0b8e4598d1e 100644 --- a/src/toasts/SetupEncryptionToast.ts +++ b/src/toasts/SetupEncryptionToast.ts @@ -6,6 +6,9 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com Please see LICENSE files in the repository root for full details. */ +import KeyIcon from "@vector-im/compound-design-tokens/assets/web/icons/key"; +import React, { type ComponentType } from "react"; + import Modal from "../Modal"; import { _t } from "../languageHandler"; import DeviceListener from "../DeviceListener"; @@ -61,6 +64,15 @@ const getSetupCaption = (kind: Kind): string => { } }; +const getPrimaryButtonIcon = (kind: Kind): ComponentType> | undefined => { + switch (kind) { + case Kind.KEY_STORAGE_OUT_OF_SYNC: + return KeyIcon; + default: + return; + } +}; + const getSecondaryButtonLabel = (kind: Kind): string => { switch (kind) { case Kind.SET_UP_RECOVERY: @@ -162,6 +174,7 @@ export const showToast = (kind: Kind): void => { props: { description: getDescription(kind), primaryLabel: getSetupCaption(kind), + PrimaryIcon: getPrimaryButtonIcon(kind), onPrimaryClick, secondaryLabel: getSecondaryButtonLabel(kind), onSecondaryClick,