From 6be18552abf59d25a3e1576d4b2c26b13556ae24 Mon Sep 17 00:00:00 2001 From: Youmna Jaza Date: Wed, 29 Mar 2023 01:04:22 +0300 Subject: [PATCH] Updating Typography to Text (#17681) Co-authored-by: georgewrmarshall --- ui/components/app/add-network/add-network.js | 60 ++++++++++--------- .../confirm-page-container.component.js | 23 +++++-- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/ui/components/app/add-network/add-network.js b/ui/components/app/add-network/add-network.js index 165359087..816d1e92c 100644 --- a/ui/components/app/add-network/add-network.js +++ b/ui/components/app/add-network/add-network.js @@ -3,13 +3,11 @@ import { useDispatch, useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; import { I18nContext } from '../../../contexts/i18n'; import Box from '../../ui/box'; -import Typography from '../../ui/typography'; import { AlignItems, DISPLAY, FLEX_DIRECTION, - FONT_WEIGHT, - TypographyVariant, + TextVariant, JustifyContent, BorderRadius, BackgroundColor, @@ -38,7 +36,7 @@ import { FEATURED_RPCS } from '../../../../shared/constants/network'; import { ADD_NETWORK_ROUTE } from '../../../helpers/constants/routes'; import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import ZENDESK_URLS from '../../../helpers/constants/zendesk-url'; -import { Icon, ICON_NAMES, ICON_SIZES } from '../../component-library'; +import { Icon, ICON_NAMES, ICON_SIZES, Text } from '../../component-library'; import { EVENT } from '../../../../shared/constants/metametrics'; const AddNetwork = () => { @@ -98,7 +96,7 @@ const AddNetwork = () => { - + {t('youHaveAddedAll', [ { : history.push(ADD_NETWORK_ROUTE); }} > - {t('addMoreNetworks')}. - + , ])} - + ) : ( @@ -144,19 +143,21 @@ const AddNetwork = () => { paddingBottom={2} className="add-network__header" > - {t('networks')} - + {' > '} - {t('addANetwork')} - + )} { marginBottom={1} className="add-network__main-container" > - {t('addFromAListOfPopularNetworks')} - - + {t('popularCustomNetworks')} - + {notExistingNetworkConfigurations.map((item, index) => ( { - {item.nickname} - + { : history.push(ADD_NETWORK_ROUTE); }} > - {t('addANetworkManually')} - + diff --git a/ui/components/app/confirm-page-container/confirm-page-container.component.js b/ui/components/app/confirm-page-container/confirm-page-container.component.js index 1943c964b..aa12f0cf5 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container.component.js @@ -20,8 +20,11 @@ import EditGasFeePopover from '../edit-gas-fee-popover/edit-gas-fee-popover'; import EditGasPopover from '../edit-gas-popover'; import ErrorMessage from '../../ui/error-message'; import { INSUFFICIENT_FUNDS_ERROR_KEY } from '../../../helpers/constants/error-keys'; -import Typography from '../../ui/typography'; -import { TypographyVariant } from '../../../helpers/constants/design-system'; +import { Text } from '../../component-library'; +import { + TextVariant, + TEXT_ALIGN, +} from '../../../helpers/constants/design-system'; import NetworkAccountBalanceHeader from '../network-account-balance-header/network-account-balance-header'; import { fetchTokenBalance } from '../../../../shared/lib/token-util.ts'; @@ -233,7 +236,11 @@ const ConfirmPageContainer = (props) => { + {t('insufficientCurrencyBuyOrDeposit', [ nativeCurrency, networkName, @@ -256,14 +263,18 @@ const ConfirmPageContainer = (props) => { {t('buyAsset', [nativeCurrency])} , ])} - + ) : ( - + {t('insufficientCurrencyDeposit', [ nativeCurrency, networkName, ])} - + ) } useIcon