Skip to content

Commit

Permalink
Updating Text and import paths (#19949)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewrmarshall authored Jul 14, 2023
1 parent 5bc0ba7 commit 74cc312
Show file tree
Hide file tree
Showing 202 changed files with 740 additions and 653 deletions.
2 changes: 1 addition & 1 deletion ui/components/app/add-network/add-network.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ import { ADD_NETWORK_ROUTE } from '../../../helpers/constants/routes';
import { getEnvironmentType } from '../../../../app/scripts/lib/util';
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
import {
Text,
Icon,
IconName,
IconSize,
AvatarNetwork,
} from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { MetaMetricsNetworkEventSource } from '../../../../shared/constants/metametrics';

const AddNetwork = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { setAdvancedGasFee } from '../../../../store/actions';
import { useGasFeeContext } from '../../../../contexts/gasFee';
import { useAdvancedGasFeePopoverContext } from '../context';
import { useI18nContext } from '../../../../hooks/useI18nContext';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const AdvancedGasFeeDefaults = () => {
const t = useI18nContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Button from '../../../ui/button';
import FormField from '../../../ui/form-field';

import { useAdvancedGasFeePopoverContext } from '../context';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const validateGasLimit = (gasLimit, minimumGasLimitDec) => {
return bnLessThan(gasLimit, minimumGasLimitDec) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useSelector } from 'react-redux';
import Box from '../../ui/box/box';
import Button from '../../ui/button';
import EditGasFeeButton from '../edit-gas-fee-button/edit-gas-fee-button';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import {
AlignItems,
BlockSize,
Expand Down
8 changes: 2 additions & 6 deletions ui/components/app/beta-header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ import {
import { BETA_BUGS_URL } from '../../../helpers/constants/beta';

import { hideBetaHeader } from '../../../store/actions';
import {
ButtonIcon,
ButtonIconSize,
IconName,
Text,
} from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { ButtonIcon, ButtonIconSize, IconName } from '../../component-library';

const BetaHeader = () => {
const t = useI18nContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import Box from '../../ui/box';
import InfoTooltip from '../../ui/info-tooltip';
import Popover from '../../ui/popover';
import AppLoadingSpinner from '../app-loading-spinner';
import { Text, Button, ButtonLink } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Button, ButtonLink } from '../../component-library';

const CancelSpeedupPopover = () => {
const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Text } from '../../component-library/text/deprecated';
import {
BUTTON_VARIANT,
Button,
Text,
Box,
Modal,
ModalOverlay,
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/confirm-data/confirm-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useTransactionFunctionType } from '../../../hooks/useTransactionFunctio
import Box from '../../ui/box/box';
import Disclosure from '../../ui/disclosure';
import TransactionDecoding from '../transaction-decoding';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';

const ConfirmData = ({ txData, dataComponent }) => {
const t = useI18nContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import TransactionDetailItem from '../../transaction-detail-item';
import UserPreferencedCurrencyDisplay from '../../user-preferenced-currency-display';
import InfoTooltip from '../../../ui/info-tooltip';
import LoadingHeartBeat from '../../../ui/loading-heartbeat';
import { Text } from '../../../component-library/text';
import { Text } from '../../../component-library/text/deprecated';
import {
FONT_STYLE,
TextVariant,
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/confirm-hexdata/confirm-hexdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
TextTransform,
} from '../../../helpers/constants/design-system';
import Box from '../../ui/box';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import CopyRawData from '../transaction-decoding/components/ui/copy-raw-data';

const ConfirmHexData = ({ txData, dataHexComponent }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ 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 { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import {
TextVariant,
TextAlign,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';

import { useSelector } from 'react-redux';
import Preloader from '../../../ui/icon/preloader/preloader-icon.component';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';
import {
AlignItems,
FLEX_DIRECTION,
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/confirm-subtitle/confirm-subtitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Color, TextVariant } from '../../../helpers/constants/design-system';
import { isNFTAssetStandard } from '../../../helpers/utils/transactions.util';
import { getShouldShowFiat } from '../../../selectors';
import { useTransactionInfo } from '../../../hooks/useTransactionInfo';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display';

const ConfirmSubTitle = ({
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/confirm-title/confirm-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';

import { TransactionType } from '../../../../shared/constants/transaction';
import { PRIMARY } from '../../../helpers/constants/common';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import {
FONT_WEIGHT,
TextVariant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
AlignItems,
IconColor,
} from '../../../helpers/constants/design-system';
import { Icon, IconName, IconSize, Text } from '../../component-library';
import { Icon, IconName, IconSize } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';

const ConfirmationWarningModal = ({ onSubmit, onCancel }) => {
const t = useI18nContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
TextColor,
TextVariant,
} from '../../../../helpers/constants/design-system';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

function addressesEqual(address1, address2) {
return String(address1).toLowerCase() === String(address2).toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/create-new-vault/create-new-vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import TextField from '../../ui/text-field';
import Button from '../../ui/button';
import CheckBox from '../../ui/check-box';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import SrpInput from '../srp-input';
import { PASSWORD_MIN_LENGTH } from '../../../helpers/constants/common';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
TextVariant,
} from '../../../helpers/constants/design-system';

import { Icon, IconName, IconSize, Text } from '../../component-library';
import { Icon, IconName, IconSize } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';

export const CustomSpendingCapTooltip = ({
tooltipContentText,
Expand Down
3 changes: 2 additions & 1 deletion ui/components/app/custom-spending-cap/custom-spending-cap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { addHexPrefix } from 'ethereumjs-util';
import { I18nContext } from '../../../contexts/i18n';
import Box from '../../ui/box';
import FormField from '../../ui/form-field';
import { Text, ButtonLink, Icon, IconName } from '../../component-library';
import { ButtonLink, Icon, IconName } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import {
AlignItems,
DISPLAY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from '../../../../helpers/constants/design-system';

import { shortenAddress } from '../../../../helpers/utils/util';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const DetectedTokenAddress = ({ tokenAddress }) => {
const t = useI18nContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
FontWeight,
TextVariant,
} from '../../../../helpers/constants/design-system';
import { Text, Box, ButtonLink } from '../../../component-library';
import { Box, ButtonLink } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const NUMBER_OF_AGGREGATORS_TO_DISPLAY = 2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useI18nContext } from '../../../../hooks/useI18nContext';
import Popover from '../../../ui/popover';
import Button from '../../../ui/button';
import { TextVariant } from '../../../../helpers/constants/design-system';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const DetectedTokenIgnoredPopover = ({
partiallyIgnoreDetectedTokens,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
import { useTokenTracker } from '../../../../hooks/useTokenTracker';
import { useTokenFiatAmount } from '../../../../hooks/useTokenFiatAmount';
import { getUseCurrencyRateCheck } from '../../../../selectors';
import { Text, Box } from '../../../component-library';
import { Box } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const DetectedTokenValues = ({
token,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TextColor,
TextVariant,
} from '../../../helpers/constants/design-system';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { areDappSuggestedAndTxParamGasFeesTheSame } from '../../../helpers/utils/confirm-tx.util';

import InfoTooltip from '../../ui/info-tooltip';
Expand Down
3 changes: 2 additions & 1 deletion ui/components/app/edit-gas-fee-button/edit-gas-fee-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import { useTransactionEventFragment } from '../../../hooks/useTransactionEventFragment';
import { useTransactionModalContext } from '../../../contexts/transaction-modal';
import InfoTooltip from '../../ui/info-tooltip/info-tooltip';
import { Icon, IconName, IconSize, Text } from '../../component-library';
import { Icon, IconName, IconSize } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';

export default function EditGasFeeButton({ userAcknowledgedGasMissing }) {
const t = useI18nContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { INSUFFICIENT_FUNDS_ERROR_KEY } from '../../../helpers/constants/error-k
import { useGasFeeContext } from '../../../contexts/gasFee';
import AppLoadingSpinner from '../app-loading-spinner';
import ZENDESK_URLS from '../../../helpers/constants/zendesk-url';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import EditGasItem from './edit-gas-item';
import NetworkStatistics from './network-statistics';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '../../../../helpers/constants/design-system';
import { isMetamaskSuggestedGasEstimate } from '../../../../helpers/utils/gas';
import { roundToDecimalPlacesRemovingExtraZeroes } from '../../../../helpers/utils/util';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const EditGasToolTip = ({
editGasMode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { isNullish } from '../../../../helpers/utils/util';
import { formatGasFeeOrFeeRange } from '../../../../helpers/utils/gas';
import { I18nContext } from '../../../../contexts/i18n';
import { useGasFeeContext } from '../../../../contexts/gasFee';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';
import { BaseFeeTooltip, PriorityFeeTooltip } from './tooltips';
import StatusSlider from './status-slider';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useI18nContext } from '../../../../hooks/useI18nContext';
import { getIsMainnet } from '../../../../selectors';
import Box from '../../../ui/box';
import InfoTooltip from '../../../ui/info-tooltip/info-tooltip';
import { Text } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const GasDetailsItemTitle = () => {
const t = useI18nContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
getLedgerTransportStatus,
} from '../../../ducks/app/app';

import { BannerAlert, ButtonLink, Text } from '../../component-library';
import { BannerAlert, ButtonLink } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { useI18nContext } from '../../../hooks/useI18nContext';
import {
SEVERITIES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
Icon,
IconName,
IconSize,
Text,
} from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import {
DISPLAY,
IconColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import { useCopyToClipboard } from '../../../../hooks/useCopyToClipboard';
import { getAddressBookEntry } from '../../../../selectors';
import { TokenStandard } from '../../../../../shared/constants/transaction';
import NftCollectionImage from '../../../ui/nft-collection-image/nft-collection-image';
import { ButtonIcon, IconName, Text } from '../../../component-library';
import { ButtonIcon, IconName } from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

export default function ContractDetailsModal({
onClose,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
ButtonIconSize,
ButtonLink,
IconName,
Text,
} from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';

const CustomizeNonce = ({
hideModal,
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/modals/eth-sign-modal/eth-sign-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
IconName,
IconSize,
Label,
Text,
} from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';
import {
AlignItems,
Display,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
BUTTON_VARIANT,
BannerAlert,
Button,
Text,
} from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';
import AccountModalContainer from '../account-modal-container';
import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import React, { useContext } from 'react';
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props';
import Box from '../../../ui/box';
import {
Text,
Button,
BUTTON_SIZES,
BUTTON_VARIANT,
ButtonIcon,
IconName,
} from '../../../component-library';
import { Text } from '../../../component-library/text/deprecated';
import {
AlignItems,
Display,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import Box from '../../ui/box/box';
import { I18nContext } from '../../../contexts/i18n';
import { CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP } from '../../../../shared/constants/network';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';

export default function NetworkAccountBalanceHeader({
networkName,
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/nft-default-image/nft-default-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
BackgroundColor,
} from '../../../helpers/constants/design-system';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { Text } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import Box from '../../ui/box/box';

export default function NftDefaultImage({
Expand Down
3 changes: 2 additions & 1 deletion ui/components/app/nft-details/nft-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ import {
AssetType,
TokenStandard,
} from '../../../../shared/constants/transaction';
import { ButtonIcon, IconName, Text } from '../../component-library';
import { ButtonIcon, IconName } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import Tooltip from '../../ui/tooltip';
import { decWEIToDecETH } from '../../../../shared/modules/conversion.utils';
import { NftItem } from '../../multichain/nft-item';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React from 'react';
import { useHistory } from 'react-router-dom';
import Box from '../../ui/box';
import Dialog from '../../ui/dialog';
import { Icon, IconName, Text } from '../../component-library';
import { Icon, IconName } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import {
TextVariant,
TextAlign,
Expand Down
Loading

0 comments on commit 74cc312

Please sign in to comment.