Skip to content

Commit a4d7711

Browse files
authored
Merge pull request #18873 from mozilla/FXA-11619
feat(settings): Add recovery key promo banner
2 parents cc75faf + 4e4a7f8 commit a4d7711

22 files changed

Lines changed: 711 additions & 288 deletions

File tree

packages/fxa-react/configs/tailwind.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const tailwindcssDir = require('tailwindcss-dir');
77

88
const screenSizes = {
99
mobileLandscape: '480px',
10-
tablet: { raw: '(min-width: 768px) and (min-height: 481px)' },
10+
tablet: {
11+
raw: '(min-width: 768px) and (min-height: 481px)',
12+
},
1113
desktop: '1024px',
1214
desktopXl: '1441px',
1315
};

packages/fxa-settings/src/components/NotificationPromoBanner/en.ftl

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/fxa-settings/src/components/NotificationPromoBanner/index.stories.tsx

Lines changed: 0 additions & 50 deletions
This file was deleted.

packages/fxa-settings/src/components/NotificationPromoBanner/index.test.tsx

Lines changed: 0 additions & 93 deletions
This file was deleted.

packages/fxa-settings/src/components/NotificationPromoBanner/index.tsx

Lines changed: 0 additions & 113 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Notification Promo Banner component
2+
account-recovery-notification-cta = Create
3+
account-recovery-notification-header-value = Don’t lose your data if you forget your password
4+
account-recovery-notification-header-description = Create an account recovery key to restore your sync browsing data if you ever forget your password.
5+
recovery-phone-promo-cta = Add recovery phone
6+
recovery-phone-promo-heading = Add extra protection to your account with a recovery phone
7+
recovery-phone-promo-description = Now you can sign in with a one-time-password via SMS if you can’t use your two-step authenticator app.
8+
recovery-phone-promo-info-link = Learn more about recovery and SIM swap risk
9+
promo-banner-dismiss-button =
10+
.aria-label = Dismiss banner
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
import React from 'react';
6+
import { Meta } from '@storybook/react';
7+
import { withLocalization } from 'fxa-react/lib/storybooks';
8+
import PromotionBanner, {
9+
AccountRecoveryKeyPromoBanner,
10+
RecoveryPhonePromoBanner,
11+
} from '.';
12+
import { LocationProvider } from '@reach/router';
13+
14+
export default {
15+
title: 'Components/PromotionBanner',
16+
component: PromotionBanner,
17+
subcomponents: { AccountRecoveryKeyPromoBanner, RecoveryPhonePromoBanner },
18+
decorators: [
19+
withLocalization,
20+
(Story) => (
21+
<LocationProvider>
22+
<Story />
23+
</LocationProvider>
24+
),
25+
],
26+
} as Meta;
27+
28+
export const AccountRecoveryKeyPromo = () => <AccountRecoveryKeyPromoBanner />;
29+
30+
export const RecoveryPhonePromo = () => <RecoveryPhonePromoBanner />;

0 commit comments

Comments
 (0)