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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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