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" 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 <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> <span>

View File

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