Skip to content

Commit 9c731fa

Browse files
authored
fix(console): add beta tag to email phone MFA (#7769)
1 parent a55d668 commit 9c731fa

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

packages/console/src/pages/Mfa/MfaForm/FactorLabel/index.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
gap: _.unit(1);
77
}
88

9+
.factorTitleWrapper {
10+
display: flex;
11+
align-items: center;
12+
gap: _.unit(2);
13+
}
14+
915
.factorDescription {
1016
font: var(--font-body-2);
1117
color: var(--color-text-secondary);

packages/console/src/pages/Mfa/MfaForm/FactorLabel/index.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { type AdminConsoleKey } from '@logto/phrases';
22
import { MfaFactor } from '@logto/schemas';
33

4+
import { BetaTag } from '@/components/FeatureTag';
45
import MfaFactorTitle from '@/components/MfaFactorTitle';
56
import DynamicT from '@/ds-components/DynamicT';
67

@@ -20,9 +21,18 @@ const factorDescriptionLabel: Record<MfaFactor, AdminConsoleKey> = {
2021
};
2122

2223
function FactorLabel({ type }: Props) {
24+
const showBetaTag =
25+
type === MfaFactor.EmailVerificationCode || type === MfaFactor.PhoneVerificationCode;
26+
2327
return (
2428
<div className={styles.factorLabel}>
25-
<MfaFactorTitle type={type} tooltip={type === MfaFactor.WebAuthn && <WebAuthnTipContent />} />
29+
<div className={styles.factorTitleWrapper}>
30+
<MfaFactorTitle
31+
type={type}
32+
tooltip={type === MfaFactor.WebAuthn && <WebAuthnTipContent />}
33+
/>
34+
{showBetaTag && <BetaTag />}
35+
</div>
2636
<div className={styles.factorDescription}>
2737
<DynamicT forKey={factorDescriptionLabel[type]} />
2838
</div>

0 commit comments

Comments
 (0)