1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

UX: Multichain: Update deprecated variables (#19795)

This commit is contained in:
David Walsh 2023-06-28 10:03:50 -05:00 committed by GitHub
parent 9454bddef6
commit 7e7b4f018c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 27 deletions

View File

@ -2,9 +2,9 @@ import React, { useCallback, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { import {
DISPLAY, Display,
FontWeight, FontWeight,
SEVERITIES, Severity,
TextVariant, TextVariant,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
import { import {
@ -60,10 +60,10 @@ export const AccountDetailsAuthenticate = ({ address, onCancel }) => {
labelProps={{ fontWeight: FontWeight.Medium }} labelProps={{ fontWeight: FontWeight.Medium }}
autoFocus autoFocus
/> />
<BannerAlert marginTop={6} severity={SEVERITIES.DANGER}> <BannerAlert marginTop={6} severity={Severity.Danger}>
<Text variant={TextVariant.bodySm}>{t('privateKeyWarning')}</Text> <Text variant={TextVariant.bodySm}>{t('privateKeyWarning')}</Text>
</BannerAlert> </BannerAlert>
<Box display={DISPLAY.FLEX} marginTop={6} gap={2}> <Box display={Display.Flex} marginTop={6} gap={2}>
<ButtonSecondary onClick={onCancel} block> <ButtonSecondary onClick={onCancel} block>
{t('cancel')} {t('cancel')}
</ButtonSecondary> </ButtonSecondary>

View File

@ -18,8 +18,8 @@ import {
} from '../../component-library'; } from '../../component-library';
import { import {
AlignItems, AlignItems,
DISPLAY, Display,
FLEX_DIRECTION, FlexDirection,
TextVariant, TextVariant,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
import { MetaMetricsContext } from '../../../contexts/metametrics'; import { MetaMetricsContext } from '../../../contexts/metametrics';
@ -50,9 +50,9 @@ export const AccountDetailsDisplay = ({
return ( return (
<Box <Box
display={DISPLAY.FLEX} display={Display.Flex}
alignItems={AlignItems.center} alignItems={AlignItems.center}
flexDirection={FLEX_DIRECTION.COLUMN} flexDirection={FlexDirection.Column}
> >
<EditableLabel <EditableLabel
defaultValue={accountName} defaultValue={accountName}

View File

@ -11,9 +11,9 @@ import {
AlignItems, AlignItems,
BorderColor, BorderColor,
BorderRadius, BorderRadius,
DISPLAY, Display,
FLEX_DIRECTION, FlexDirection,
SEVERITIES, Severity,
TextVariant, TextVariant,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
import { useI18nContext } from '../../../hooks/useI18nContext'; import { useI18nContext } from '../../../hooks/useI18nContext';
@ -35,8 +35,8 @@ export const AccountDetailsKey = ({ accountName, onClose, privateKey }) => {
{t('privateKeyCopyWarning', [accountName])} {t('privateKeyCopyWarning', [accountName])}
</Text> </Text>
<Box <Box
display={DISPLAY.FLEX} display={Display.Flex}
flexDirection={FLEX_DIRECTION.ROW} flexDirection={FlexDirection.Row}
alignItems={AlignItems.center} alignItems={AlignItems.center}
borderRadius={BorderRadius.SM} borderRadius={BorderRadius.SM}
borderWidth={1} borderWidth={1}
@ -52,7 +52,7 @@ export const AccountDetailsKey = ({ accountName, onClose, privateKey }) => {
iconName={privateKeyCopied ? IconName.CopySuccess : IconName.Copy} iconName={privateKeyCopied ? IconName.CopySuccess : IconName.Copy}
/> />
</Box> </Box>
<BannerAlert severity={SEVERITIES.DANGER} marginTop={4}> <BannerAlert severity={Severity.Danger} marginTop={4}>
<Text variant={TextVariant.bodySm}>{t('privateKeyWarning')}</Text> <Text variant={TextVariant.bodySm}>{t('privateKeyWarning')}</Text>
</BannerAlert> </BannerAlert>
<ButtonPrimary marginTop={6} onClick={onClose}> <ButtonPrimary marginTop={6} onClick={onClose}>

View File

@ -21,11 +21,11 @@ import { getMetaMaskAccountsOrdered } from '../../../selectors';
import { useI18nContext } from '../../../hooks/useI18nContext'; import { useI18nContext } from '../../../hooks/useI18nContext';
import { import {
AlignItems, AlignItems,
DISPLAY,
FLEX_DIRECTION,
JustifyContent, JustifyContent,
TextVariant, TextVariant,
Size, Size,
Display,
FlexDirection,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
import { AddressCopyButton } from '../address-copy-button'; import { AddressCopyButton } from '../address-copy-button';
import { AccountDetailsDisplay } from './account-details-display'; import { AccountDetailsDisplay } from './account-details-display';
@ -93,7 +93,7 @@ export const AccountDetails = ({ address }) => {
) : ( ) : (
<PopoverHeader <PopoverHeader
childrenWrapperProps={{ childrenWrapperProps={{
display: DISPLAY.FLEX, display: Display.Text,
justifyContent: JustifyContent.center, justifyContent: JustifyContent.center,
}} }}
> >
@ -106,9 +106,9 @@ export const AccountDetails = ({ address }) => {
{attemptingExport ? ( {attemptingExport ? (
<> <>
<Box <Box
display={DISPLAY.FLEX} display={Display.Flex}
alignItems={AlignItems.center} alignItems={AlignItems.center}
flexDirection={FLEX_DIRECTION.COLUMN} flexDirection={FlexDirection.Column}
> >
{avatar} {avatar}
<Text <Text

View File

@ -12,7 +12,7 @@ import {
} from '../../component-library'; } from '../../component-library';
import { AccountListItem, CreateAccount, ImportAccount } from '..'; import { AccountListItem, CreateAccount, ImportAccount } from '..';
import { import {
BLOCK_SIZES, BlockSize,
Size, Size,
TextColor, TextColor,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
@ -129,7 +129,7 @@ export const AccountListMenu = ({ onClose }) => {
> >
<TextFieldSearch <TextFieldSearch
size={Size.SM} size={Size.SM}
width={BLOCK_SIZES.FULL} width={BlockSize.Full}
placeholder={t('searchAccounts')} placeholder={t('searchAccounts')}
value={searchQuery} value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)} onChange={(e) => setSearchQuery(e.target.value)}

View File

@ -11,7 +11,7 @@ import {
BackgroundColor, BackgroundColor,
BorderColor, BorderColor,
BorderRadius, BorderRadius,
DISPLAY, Display,
IconColor, IconColor,
JustifyContent, JustifyContent,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
@ -41,7 +41,7 @@ export const ConnectedSiteMenu = ({
data-testid="connection-menu" data-testid="connection-menu"
as="button" as="button"
onClick={onClick} onClick={onClick}
display={DISPLAY.FLEX} display={Display.Flex}
alignItems={AlignItems.center} alignItems={AlignItems.center}
justifyContent={JustifyContent.center} justifyContent={JustifyContent.center}
backgroundColor={BackgroundColor.backgroundDefault} backgroundColor={BackgroundColor.backgroundDefault}

View File

@ -10,8 +10,8 @@ import {
Size, Size,
JustifyContent, JustifyContent,
TextColor, TextColor,
BLOCK_SIZES,
BackgroundColor, BackgroundColor,
BlockSize,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
import { import {
AvatarNetwork, AvatarNetwork,
@ -69,7 +69,7 @@ export const NetworkListItem = ({
})} })}
alignItems={AlignItems.center} alignItems={AlignItems.center}
justifyContent={JustifyContent.spaceBetween} justifyContent={JustifyContent.spaceBetween}
width={BLOCK_SIZES.FULL} width={BlockSize.Full}
ref={networkRef} ref={networkRef}
> >
{selected && ( {selected && (

View File

@ -21,7 +21,7 @@ import {
import Box from '../../ui/box/box'; import Box from '../../ui/box/box';
import ToggleButton from '../../ui/toggle-button'; import ToggleButton from '../../ui/toggle-button';
import { import {
DISPLAY, Display,
JustifyContent, JustifyContent,
} from '../../../helpers/constants/design-system'; } from '../../../helpers/constants/design-system';
import { import {
@ -140,7 +140,7 @@ export const NetworkListMenu = ({ onClose }) => {
</Box> </Box>
<Box <Box
padding={4} padding={4}
display={DISPLAY.FLEX} display={Display.Flex}
justifyContent={JustifyContent.spaceBetween} justifyContent={JustifyContent.spaceBetween}
> >
<Text>{t('showTestnetNetworks')}</Text> <Text>{t('showTestnetNetworks')}</Text>