Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part of #17670: Replace Typography with Text component in RecoveryPhraseReminder #18639

Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import Box from '../../ui/box';
import Button from '../../ui/button';
import Popover from '../../ui/popover';
import Typography from '../../ui/typography';
import { Text } from '../../component-library';
// Helpers
import {
DISPLAY,
TEXT_ALIGN,
TypographyVariant,
TextVariant,
BLOCK_SIZES,
FONT_WEIGHT,
FontWeight,
JustifyContent,
TextColor,
} from '../../../helpers/constants/design-system';
Expand All @@ -35,27 +35,25 @@ export default function RecoveryPhraseReminder({ onConfirm, hasBackedUp }) {
paddingLeft={4}
className="recovery-phrase-reminder"
>
<Typography
<Text
color={TextColor.textDefault}
align={TEXT_ALIGN.CENTER}
variant={TypographyVariant.paragraph}
boxProps={{ marginTop: 0, marginBottom: 4 }}
variant={TextVariant.bodyMd}
marginBottom={4}
>
{t('recoveryPhraseReminderSubText')}
</Typography>
</Text>
<Box marginTop={4} marginBottom={8}>
<ul className="recovery-phrase-reminder__list">
<li>
<Typography
as="span"
color={TextColor.textDefault}
fontWeight={FONT_WEIGHT.BOLD}
>
{t('recoveryPhraseReminderItemOne')}
</Typography>
</li>
<li>{t('recoveryPhraseReminderItemTwo')}</li>
<li>
<Text
as="li"
color={TextColor.textDefault}
fontWeight={FontWeight.Bold}
>
{t('recoveryPhraseReminderItemOne')}
</Text>
<Text as="li">{t('recoveryPhraseReminderItemTwo')}</Text>
<Text as="li">
{hasBackedUp ? (
t('recoveryPhraseReminderHasBackedUp')
) : (
Expand All @@ -75,7 +73,7 @@ export default function RecoveryPhraseReminder({ onConfirm, hasBackedUp }) {
</Box>
</>
)}
</li>
</Text>
</ul>
</Box>
<Box justifyContent={JustifyContent.center}>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import RecoveryPhraseReminder from '.';

export default {
title: 'Components/App/RecoveryPhraseReminder',

argTypes: {
hasBackedUp: {
control: 'boolean',
},
onConfirm: {
action: 'onConfirm',
},
},
args: {
hasBackedUp: false,
onConfirm: () => console.log('onConfirm fired'),
},
};

export const DefaultStory = (args) => <RecoveryPhraseReminder {...args} />;

DefaultStory.storyName = 'Default';