Update @vector-im/compound-web (#12718)

* deps: update `@vector-im/compound-web`

* feat: use new EditInPlace

* e2e: update snapshots
This commit is contained in:
Florian Duros 2024-07-02 14:35:13 +02:00 committed by GitHub
parent 510fb1ba2f
commit 53ea045c54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 150 additions and 219 deletions

View file

@ -23,6 +23,8 @@ import {
RadioControl,
EditInPlace,
IconButton,
ErrorMessage,
HelpMessage,
} from "@vector-im/compound-web";
import { Icon as DeleteIcon } from "@vector-im/compound-design-tokens/icons/delete.svg";
import classNames from "classnames";
@ -231,10 +233,9 @@ function CustomTheme({ theme }: CustomThemeProps): JSX.Element {
<EditInPlace
className="mx_ThemeChoicePanel_CustomTheme_EditInPlace"
label={_t("settings|appearance|custom_theme_add")}
cancelButtonLabel={_t("action|cancel")}
saveButtonLabel={_t("settings|appearance|custom_theme_add")}
savingLabel={_t("settings|appearance|custom_theme_downloading")}
helpLabel={_t("settings|appearance|custom_theme_help")}
error={error}
value={customTheme}
onChange={(e: ChangeEvent<HTMLInputElement>) => {
setError(undefined);
@ -281,7 +282,10 @@ function CustomTheme({ theme }: CustomThemeProps): JSX.Element {
await SettingsStore.setValue("custom_themes", null, SettingLevel.ACCOUNT, currentThemes);
}}
onCancel={clear}
/>
>
<HelpMessage>{_t("settings|appearance|custom_theme_help")}</HelpMessage>
{error && <ErrorMessage>{error}</ErrorMessage>}
</EditInPlace>
<CustomThemeList theme={theme} />
</div>
);