1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Part of #17670: Replace Typography with Text component in beta-header/index.js (#18964)

* Changes to beta-header/index.js

* Updated-snapshot

* Suggested changes

* Changes to the text color enum
This commit is contained in:
Dhruv 2023-05-03 19:20:06 +05:30 committed by GitHub
parent 28241b0592
commit 657b94cd47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 10 deletions

View File

@ -6,7 +6,7 @@ exports[`Beta Header should match snapshot 1`] = `
class="box beta-header box--padding-2 box--display-flex box--flex-direction-row box--align-items-center box--width-full box--background-color-warning-default"
>
<h6
class="box box--flex-direction-row typography beta-header__message typography--h7 typography--weight-normal typography--style-normal typography--color-warning-inverse"
class="box mm-text beta-header__message mm-text--body-sm box--flex-direction-row box--color-warning-inverse"
>
<span>

View File

@ -2,19 +2,24 @@ import React from 'react';
import { useI18nContext } from '../../../hooks/useI18nContext';
import Box from '../../ui/box/box';
import Typography from '../../ui/typography/typography';
import {
TypographyVariant,
TextVariant,
Color,
BLOCK_SIZES,
DISPLAY,
AlignItems,
IconColor,
TextColor,
} from '../../../helpers/constants/design-system';
import { BETA_BUGS_URL } from '../../../helpers/constants/beta';
import { hideBetaHeader } from '../../../store/actions';
import { ButtonIcon, ButtonIconSize, IconName } from '../../component-library';
import {
ButtonIcon,
ButtonIconSize,
IconName,
Text,
} from '../../component-library';
const BetaHeader = () => {
const t = useI18nContext();
@ -28,12 +33,11 @@ const BetaHeader = () => {
className="beta-header"
alignItems={AlignItems.center}
>
<Typography
variant={TypographyVariant.H7}
marginTop={0}
marginBottom={0}
<Text
variant={TextVariant.bodySm}
as="h6"
className="beta-header__message"
color={Color.warningInverse}
color={TextColor.warningInverse}
>
{t('betaHeaderText', [
<a
@ -45,7 +49,7 @@ const BetaHeader = () => {
{t('here')}
</a>,
])}
</Typography>
</Text>
<ButtonIcon
iconName={IconName.Close}
size={ButtonIconSize.Sm}