mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Update Text import paths: /multichain (#20061)
* Updating import paths for Text component * Updating snapshots * Adding story for TokenCell * Updating banner in account details * Fixing lint issue by removing unused import
This commit is contained in:
parent
3f3ee63b17
commit
36be38e979
@ -51,7 +51,7 @@ exports[`Token Cell should match snapshot 1`] = `
|
||||
title=""
|
||||
>
|
||||
<p
|
||||
class="box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--ellipsis box--flex-direction-row box--color-text-default"
|
||||
class="mm-box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--ellipsis mm-box--color-text-default"
|
||||
>
|
||||
TEST
|
||||
</p>
|
||||
@ -59,11 +59,11 @@ exports[`Token Cell should match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<p
|
||||
class="box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--text-align-end box--flex-direction-row box--width-2/3 box--color-text-default"
|
||||
class="mm-box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--text-align-end mm-box--width-2/3 mm-box--color-text-default"
|
||||
/>
|
||||
</div>
|
||||
<p
|
||||
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-alternative"
|
||||
class="mm-box mm-text mm-text--body-md mm-box--color-text-alternative"
|
||||
data-testid="multichain-token-list-item-value"
|
||||
>
|
||||
5.000
|
||||
|
33
ui/components/app/token-cell/token-cell.stories.js
Normal file
33
ui/components/app/token-cell/token-cell.stories.js
Normal file
@ -0,0 +1,33 @@
|
||||
import React from 'react';
|
||||
import TokenListItem from '.';
|
||||
|
||||
export default {
|
||||
title: 'Components/App/TokenCell',
|
||||
argTypes: {
|
||||
address: {
|
||||
control: 'text',
|
||||
},
|
||||
symbol: {
|
||||
control: 'text',
|
||||
},
|
||||
string: {
|
||||
control: 'text',
|
||||
},
|
||||
onClick: {
|
||||
action: 'onClick',
|
||||
},
|
||||
image: {
|
||||
control: 'text',
|
||||
},
|
||||
},
|
||||
args: {
|
||||
address: '0xAnotherToken',
|
||||
symbol: 'TEST',
|
||||
string: '5.000',
|
||||
currentCurrency: 'usd',
|
||||
},
|
||||
};
|
||||
|
||||
export const DefaultStory = (args) => <TokenListItem {...args} />;
|
||||
|
||||
DefaultStory.storyName = 'Default';
|
@ -14,7 +14,7 @@ import {
|
||||
FormTextField,
|
||||
Box,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
|
||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||
import { exportAccount, hideWarning } from '../../../store/actions';
|
||||
|
||||
@ -60,9 +60,11 @@ export const AccountDetailsAuthenticate = ({ address, onCancel }) => {
|
||||
labelProps={{ fontWeight: FontWeight.Medium }}
|
||||
autoFocus
|
||||
/>
|
||||
<BannerAlert marginTop={6} severity={Severity.Danger}>
|
||||
<Text variant={TextVariant.bodySm}>{t('privateKeyWarning')}</Text>
|
||||
</BannerAlert>
|
||||
<BannerAlert
|
||||
marginTop={6}
|
||||
severity={Severity.Danger}
|
||||
description={t('privateKeyWarning')}
|
||||
/>
|
||||
<Box display={Display.Flex} marginTop={6} gap={2}>
|
||||
<ButtonSecondary onClick={onCancel} block>
|
||||
{t('cancel')}
|
||||
|
@ -6,8 +6,9 @@ import {
|
||||
ButtonPrimary,
|
||||
IconName,
|
||||
Box,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
|
||||
import {
|
||||
AlignItems,
|
||||
BorderColor,
|
||||
|
@ -15,8 +15,8 @@ import {
|
||||
ModalHeader,
|
||||
ModalOverlay,
|
||||
Box,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import { getMetaMaskAccountsOrdered } from '../../../selectors';
|
||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||
import {
|
||||
|
@ -30,8 +30,8 @@ import {
|
||||
PopoverPosition,
|
||||
ModalFocus,
|
||||
PopoverRole,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import {
|
||||
MetaMetricsEventCategory,
|
||||
MetaMetricsEventLinkType,
|
||||
|
@ -58,7 +58,7 @@ exports[`AccountListItem renders AccountListItem component and shows account nam
|
||||
class="mm-box mm-box--display-flex mm-box--justify-content-space-between"
|
||||
>
|
||||
<div
|
||||
class="box mm-text multichain-account-list-item__account-name mm-text--body-md mm-text--ellipsis box--margin-inline-end-2 box--flex-direction-row box--color-text-default"
|
||||
class="mm-box mm-text multichain-account-list-item__account-name mm-text--body-md mm-text--ellipsis mm-box--margin-inline-end-2 mm-box--color-text-default"
|
||||
>
|
||||
<button
|
||||
class="mm-box mm-text mm-button-base mm-button-base--ellipsis multichain-account-list-item__account-name__button mm-button-link mm-button-link--size-auto mm-text--body-md-medium mm-text--ellipsis mm-box--padding-right-0 mm-box--padding-left-0 mm-box--display-inline-flex mm-box--justify-content-center mm-box--align-items-center mm-box--color-text-default mm-box--background-color-transparent"
|
||||
@ -71,7 +71,7 @@ exports[`AccountListItem renders AccountListItem component and shows account nam
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="box mm-text multichain-account-list-item__asset mm-text--body-md mm-text--ellipsis mm-text--text-align-end box--display-flex box--flex-direction-row box--align-items-center box--color-text-default"
|
||||
class="mm-box mm-text multichain-account-list-item__asset mm-text--body-md mm-text--ellipsis mm-text--text-align-end mm-box--display-flex mm-box--flex-direction-row mm-box--align-items-center mm-box--color-text-default"
|
||||
>
|
||||
<div
|
||||
class="currency-display-component"
|
||||
@ -101,13 +101,13 @@ exports[`AccountListItem renders AccountListItem component and shows account nam
|
||||
class="mm-box mm-box--display-flex mm-box--align-items-center"
|
||||
>
|
||||
<p
|
||||
class="box mm-text mm-text--body-sm box--flex-direction-row box--color-text-alternative"
|
||||
class="mm-box mm-text mm-text--body-sm mm-box--color-text-alternative"
|
||||
>
|
||||
0x0dc...e7bc
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="box mm-text mm-text--body-sm mm-text--text-align-end box--flex-direction-row box--color-text-alternative"
|
||||
class="mm-box mm-text mm-text--body-sm mm-text--text-align-end mm-box--color-text-alternative"
|
||||
>
|
||||
<div
|
||||
class="currency-display-component"
|
||||
|
@ -18,8 +18,8 @@ import {
|
||||
IconName,
|
||||
IconSize,
|
||||
AvatarAccountVariant,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import {
|
||||
Color,
|
||||
TextAlign,
|
||||
|
@ -12,8 +12,8 @@ import {
|
||||
ModalContent,
|
||||
ModalOverlay,
|
||||
ModalHeader,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import { AccountListItem, CreateAccount, ImportAccount } from '..';
|
||||
import {
|
||||
BlockSize,
|
||||
|
@ -26,7 +26,7 @@ exports[`AccountPicker renders properly 1`] = `
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
class="box mm-text mm-text--body-md mm-text--font-weight-bold mm-text--ellipsis box--flex-direction-row box--color-text-default"
|
||||
class="mm-box mm-text mm-text--body-md mm-text--font-weight-bold mm-text--ellipsis mm-box--color-text-default"
|
||||
>
|
||||
Account 1
|
||||
</span>
|
||||
|
@ -7,8 +7,8 @@ import {
|
||||
AvatarAccountVariant,
|
||||
Icon,
|
||||
IconName,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import {
|
||||
AlignItems,
|
||||
BackgroundColor,
|
||||
|
@ -278,7 +278,7 @@ exports[`App Header should match snapshot 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<span
|
||||
class="box mm-text mm-text--body-md mm-text--font-weight-bold mm-text--ellipsis box--flex-direction-row box--color-text-default"
|
||||
class="mm-box mm-text mm-text--body-md mm-text--font-weight-bold mm-text--ellipsis mm-box--color-text-default"
|
||||
>
|
||||
Test Account
|
||||
</span>
|
||||
|
@ -12,10 +12,13 @@ import {
|
||||
} from '../../../helpers/constants/routes';
|
||||
import { lockMetamask } from '../../../store/actions';
|
||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||
import { IconName } from '../../component-library';
|
||||
///: BEGIN:ONLY_INCLUDE_IN(snaps)
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
///: END:ONLY_INCLUDE_IN(snaps)
|
||||
import {
|
||||
IconName,
|
||||
///: BEGIN:ONLY_INCLUDE_IN(snaps)
|
||||
Text,
|
||||
///: END:ONLY_INCLUDE_IN(snaps)
|
||||
} from '../../component-library';
|
||||
|
||||
import { Menu, MenuItem } from '../../ui/menu';
|
||||
import { getEnvironmentType } from '../../../../app/scripts/lib/util';
|
||||
import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app';
|
||||
|
@ -3,7 +3,7 @@
|
||||
exports[`Json should match snapshot 1`] = `
|
||||
<DocumentFragment>
|
||||
<p
|
||||
class="box mm-text mm-text--body-md mm-text--text-align-center box--flex-direction-row box--color-text-default"
|
||||
class="mm-box mm-text mm-text--body-md mm-text--text-align-center mm-box--color-text-default"
|
||||
>
|
||||
Used by a variety of different clients
|
||||
<a
|
||||
|
@ -7,8 +7,7 @@ import {
|
||||
MetaMetricsEventCategory,
|
||||
MetaMetricsEventName,
|
||||
} from '../../../../shared/constants/metametrics';
|
||||
import { ButtonLink, Label, Box } from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import { ButtonLink, Label, Box, Text } from '../../component-library';
|
||||
import Dropdown from '../../ui/dropdown';
|
||||
import { MetaMetricsContext } from '../../../contexts/metametrics';
|
||||
import {
|
||||
|
@ -7,8 +7,8 @@ import {
|
||||
FormTextField,
|
||||
TEXT_FIELD_SIZES,
|
||||
TEXT_FIELD_TYPES,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import {
|
||||
Size,
|
||||
TextVariant,
|
||||
|
@ -31,8 +31,8 @@ import {
|
||||
ModalHeader,
|
||||
ModalOverlay,
|
||||
Box,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import { ADD_POPULAR_CUSTOM_NETWORK } from '../../../helpers/constants/routes';
|
||||
import { getEnvironmentType } from '../../../../app/scripts/lib/util';
|
||||
import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app';
|
||||
|
@ -14,8 +14,13 @@ import {
|
||||
TextVariant,
|
||||
TextAlign,
|
||||
} from '../../../helpers/constants/design-system';
|
||||
import { ButtonBase, ButtonIcon, IconName, Box } from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import {
|
||||
ButtonBase,
|
||||
ButtonIcon,
|
||||
IconName,
|
||||
Box,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||
import { Menu } from '../../ui/menu';
|
||||
|
||||
|
@ -45,16 +45,16 @@ exports[`TokenListItem should render correctly 1`] = `
|
||||
>
|
||||
<div>
|
||||
<p
|
||||
class="box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--ellipsis box--flex-direction-row box--color-text-default"
|
||||
class="mm-box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--ellipsis mm-box--color-text-default"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p
|
||||
class="box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--text-align-end box--flex-direction-row box--width-2/3 box--color-text-default"
|
||||
class="mm-box mm-text mm-text--body-md mm-text--font-weight-medium mm-text--text-align-end mm-box--width-2/3 mm-box--color-text-default"
|
||||
/>
|
||||
</div>
|
||||
<p
|
||||
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-alternative"
|
||||
class="mm-box mm-text mm-text--body-md mm-box--color-text-alternative"
|
||||
data-testid="multichain-token-list-item-value"
|
||||
>
|
||||
|
||||
|
@ -19,8 +19,8 @@ import {
|
||||
AvatarToken,
|
||||
BadgeWrapper,
|
||||
Box,
|
||||
Text,
|
||||
} from '../../component-library';
|
||||
import { Text } from '../../component-library/text/deprecated';
|
||||
import {
|
||||
getCurrentChainId,
|
||||
getCurrentNetwork,
|
||||
|
Loading…
Reference in New Issue
Block a user