Skip to content

Commit

Permalink
Updating Text import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewrmarshall committed Jul 18, 2023
1 parent e75535d commit 229f5a2
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 48 deletions.
2 changes: 1 addition & 1 deletion ui/components/ui/box/box.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
FlexWrap,
} from '../../../helpers/constants/design-system';

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

import Box from './box';

Expand Down
3 changes: 1 addition & 2 deletions ui/components/ui/callout/callout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import classnames from 'classnames';
import InfoIconInverted from '../icon/info-icon-inverted.component';
import { Severity, TextColor } from '../../../helpers/constants/design-system';
import { MILLISECOND } from '../../../../shared/constants/time';
import { ButtonIcon, IconName, IconSize } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { ButtonIcon, IconName, IconSize, Text } from '../../component-library';

/**
* @deprecated `<Callout />` has been deprecated in favor of the `<BannerAlert />`
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/callout/callout.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
TextVariant,
} from '../../../helpers/constants/design-system';
import Box from '../box';
import { Text } from '../../component-library/text/deprecated';
import { Text } from '../../component-library';
import Callout from './callout';

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import Box from '../box/box';
import ActionableMessage from '../actionable-message/actionable-message';
import { getCurrentChainId } from '../../../selectors';
import { getCompletedOnboarding } from '../../../ducks/metamask/metamask';
import { Icon, IconName, IconSize } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Icon, IconName, IconSize, Text } from '../../component-library';

export default function DeprecatedTestNetworks() {
const currentChainID = useSelector(getCurrentChainId);
Expand Down
10 changes: 7 additions & 3 deletions ui/components/ui/editable-label/editable-label.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ import {
TextVariant,
} from '../../../helpers/constants/design-system';
import { getAccountNameErrorMessage } from '../../../helpers/utils/accounts';
import { ButtonIcon, FormTextField, IconName } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import Box from '../box/box';
import {
ButtonIcon,
FormTextField,
IconName,
Text,
Box,
} from '../../component-library';

export default class EditableLabel extends Component {
static propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import {
JustifyContent,
TextVariant,
} from '../../../helpers/constants/design-system';
import Box from '../box/box';
import { ButtonSecondary } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { ButtonSecondary, Text, Box } from '../../component-library';

function ExportTextContainer({ text = '', onClickCopy = null }) {
const ONE_MINUTE = 1000 * 60;
Expand Down
3 changes: 1 addition & 2 deletions ui/components/ui/form-field/form-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import {

import NumericInput from '../numeric-input/numeric-input.component';
import InfoTooltip from '../info-tooltip/info-tooltip';
import { Box } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Box, Text } from '../../component-library';

/**
* @deprecated The `<FormField />` component has been deprecated in favor of the new `<FormTextField>` component from the component-library.
Expand Down
3 changes: 1 addition & 2 deletions ui/components/ui/form-field/form-field.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import React, { useState } from 'react';
import Tooltip from '../tooltip';

import { Icon, IconName } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Icon, IconName, Text } from '../../component-library';
import { AlignItems } from '../../../helpers/constants/design-system';
import README from './README.mdx';
import FormField from '.';
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/icon-button/icon-button.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Text } from '../../component-library/text/deprecated';
import { Text } from '../../component-library';
import { TextVariant } from '../../../helpers/constants/design-system';
import Tooltip from '../tooltip/tooltip';

Expand Down
3 changes: 1 addition & 2 deletions ui/components/ui/logo/logo.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React from 'react';

import { BackgroundColor } from '../../../helpers/constants/design-system';
import { Text } from '../../component-library/text/deprecated';
import { Text } from '../../component-library';

import Card from '../card';
import Box from '../box';
Expand All @@ -16,7 +16,6 @@ import README from './README.mdx';

export default {
title: 'Components/UI/Logo',

parameters: {
docs: {
page: README,
Expand Down
3 changes: 1 addition & 2 deletions ui/components/ui/menu/menu-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';

import { Icon, IconSize } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Icon, IconSize, Text } from '../../component-library';
import { TextVariant } from '../../../helpers/constants/design-system';

const MenuItem = React.forwardRef(
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/metafox-logo/metafox-logo.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

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

export default {
Expand Down
3 changes: 1 addition & 2 deletions ui/components/ui/new-network-info/new-network-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ import { IMPORT_TOKEN_ROUTE } from '../../../helpers/constants/routes';
import Chip from '../chip/chip';
import { setFirstTimeUsedNetwork } from '../../../store/actions';
import { NETWORK_TYPES } from '../../../../shared/constants/network';
import { Icon, IconName } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import { Icon, IconName, Text } from '../../component-library';
import { getNetworkLabelKey } from '../../../helpers/utils/i18n-helper';

const NewNetworkInfo = () => {
Expand Down
21 changes: 6 additions & 15 deletions ui/components/ui/nft-info/nft-info.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import React, { useContext } from 'react';
import PropTypes from 'prop-types';
import { I18nContext } from '../../../contexts/i18n';
import Box from '../box';
import {
BackgroundColor,
DISPLAY,
Display,
TextColor,
TextVariant,
} from '../../../helpers/constants/design-system';
import Identicon from '../identicon';
import Button from '../button';
import { Text } from '../../component-library/text/deprecated';
import { Text, Button, Box, BUTTON_VARIANT } from '../../component-library';

export default function NftInfo({ assetName, tokenAddress, tokenId }) {
const t = useContext(I18nContext);

return (
<Box
display={DISPLAY.FLEX}
display={Display.Flex}
className="nft-info"
backgroundColor={BackgroundColor.backgroundAlternative}
>
<Box display={DISPLAY.FLEX} className="nft-info__content">
<Box display={Display.Flex} className="nft-info__content">
<Box margin={4}>
<Identicon address={tokenAddress} diameter={24} />
</Box>
Expand All @@ -40,15 +38,8 @@ export default function NftInfo({ assetName, tokenAddress, tokenId }) {
</Box>
</Box>
<Box marginTop={4} marginRight={4}>
<Button className="nft-info__button" type="link">
<Text
variant={TextVariant.bodySm}
as="h6"
marginTop={0}
color={TextColor.primaryDefault}
>
{t('view')}
</Text>
<Button className="nft-info__button" variant={BUTTON_VARIANT.LINK}>
{t('view')}
</Button>
</Box>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/numeric-input/numeric-input.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
TextVariant,
} from '../../../helpers/constants/design-system';
import { DECIMAL_REGEX } from '../../../../shared/constants/tokens';
import { Text } from '../../component-library/text/deprecated';
import { Text } from '../../component-library';

export default function NumericInput({
detailText = '',
Expand Down
9 changes: 7 additions & 2 deletions ui/components/ui/popover/popover.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ import {
BLOCK_SIZES,
} from '../../../helpers/constants/design-system';

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

const defaultHeaderProps = {
padding: [6, 4, 4],
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/radio-group/radio-group.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { I18nContext } from '../../../contexts/i18n';
import { Color, TextVariant } from '../../../helpers/constants/design-system';
import { Text } from '../../component-library/text/deprecated';
import { Text } from '../../component-library';

function Connector({ isFirst, isLast }) {
if (isFirst) {
Expand Down
10 changes: 8 additions & 2 deletions ui/components/ui/review-spending-cap/review-spending-cap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ import PropTypes from 'prop-types';
import { I18nContext } from '../../../contexts/i18n';
import Box from '../box';
import Tooltip from '../tooltip';
import { ButtonLink, Icon, IconName, IconSize } from '../../component-library';
import { Text } from '../../component-library/text/deprecated';
import {
ButtonLink,
Icon,
IconName,
IconSize,
Text,
} from '../../component-library';

import {
AlignItems,
DISPLAY,
Expand Down
2 changes: 1 addition & 1 deletion ui/components/ui/slider/slider.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '../../../helpers/constants/design-system';

import InfoTooltip from '../info-tooltip/info-tooltip';
import { Text } from '../../component-library/text/deprecated';
import { Text } from '../../component-library';

const styles = {
root: {
Expand Down
3 changes: 1 addition & 2 deletions ui/components/ui/tabs/snaps/dropdown-tab/dropdown-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
FLEX_WRAP,
TextVariant,
} from '../../../../../helpers/constants/design-system';
import { Icon, IconName, IconSize } from '../../../../component-library';
import { Text } from '../../../../component-library/text/deprecated';
import { Icon, IconName, IconSize, Text } from '../../../../component-library';

export const DropdownTab = ({
activeClassName,
Expand Down

0 comments on commit 229f5a2

Please sign in to comment.