Tooltip: migrate remaining tooltips from AccessibleTooltipButton
to AccessibleButton
(#12522)
* Use `AccessibleButton` in `RovingAccessibleTooltipButton` * Update snapshots * Update @vector-im/compound-web * Update composer * Update formating buttons * Update snapshots * Update `ContextMenuTooltipButton.tsx` * Fix placement * Update tests * Remove placement * Update space panel snapshot * Remove default placement * Update snapshots * Update snapshots * Use kbd * Update ``@vector-im/compound-web` * Migrate remaining files * Remove `AccessibleTooltipButton.tsx` * Add test to `InteractiveAuthEntryComponents` * Add test to `InteractiveAuthEntryComponents` * Back to old RoomList-test.tsx * Improve `InteractiveAuthEntryComponent` tests * Review changes
This commit is contained in:
parent
8f3c8b3515
commit
75562b1d1b
6 changed files with 114 additions and 139 deletions
|
@ -26,10 +26,8 @@ import SettingsStore from "../../../settings/SettingsStore";
|
|||
import { LocalisedPolicy, Policies } from "../../../Terms";
|
||||
import { AuthHeaderModifier } from "../../structures/auth/header/AuthHeaderModifier";
|
||||
import AccessibleButton, { AccessibleButtonKind, ButtonEvent } from "../elements/AccessibleButton";
|
||||
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
||||
import Field from "../elements/Field";
|
||||
import Spinner from "../elements/Spinner";
|
||||
import { Alignment } from "../elements/Tooltip";
|
||||
import CaptchaForm from "./CaptchaForm";
|
||||
|
||||
/* This file contains a collection of components which are used by the
|
||||
|
@ -501,15 +499,16 @@ export class EmailIdentityAuthEntry extends React.Component<
|
|||
{},
|
||||
{
|
||||
a: (text: string) => (
|
||||
<AccessibleTooltipButton
|
||||
<AccessibleButton
|
||||
kind="link_inline"
|
||||
title={
|
||||
this.state.requested ? _t("auth|uia|email_resent") : _t("action|resend")
|
||||
}
|
||||
alignment={Alignment.Right}
|
||||
onHideTooltip={
|
||||
onTooltipOpenChange={
|
||||
this.state.requested
|
||||
? () => this.setState({ requested: false })
|
||||
? (open) => {
|
||||
if (!open) this.setState({ requested: false });
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
onClick={async (): Promise<void> => {
|
||||
|
@ -524,7 +523,7 @@ export class EmailIdentityAuthEntry extends React.Component<
|
|||
}}
|
||||
>
|
||||
{text}
|
||||
</AccessibleTooltipButton>
|
||||
</AccessibleButton>
|
||||
),
|
||||
},
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue