mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Update Text import paths: /ui (#20076)
* Updating Text import paths in ui folder * Updating snapshot
This commit is contained in:
parent
b4bc033b72
commit
f9649a27f8
@ -159,7 +159,7 @@ describe('Create token, approve token and approve token without gas', function (
|
|||||||
|
|
||||||
const defaultSpendingCap = await driver.findElement({
|
const defaultSpendingCap = await driver.findElement({
|
||||||
text: '7 TST',
|
text: '7 TST',
|
||||||
css: '.box--flex-direction-row > h6',
|
css: '.mm-box > h6',
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
@ -249,7 +249,7 @@ describe('Create token, approve token and approve token without gas', function (
|
|||||||
|
|
||||||
let spendingCap = await driver.findElement({
|
let spendingCap = await driver.findElement({
|
||||||
text: '5 TST',
|
text: '5 TST',
|
||||||
css: '.box--flex-direction-row > h6',
|
css: '.mm-box > h6',
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
@ -305,7 +305,7 @@ describe('Create token, approve token and approve token without gas', function (
|
|||||||
|
|
||||||
spendingCap = await driver.findElement({
|
spendingCap = await driver.findElement({
|
||||||
text: '9 TST',
|
text: '9 TST',
|
||||||
css: '.box--flex-direction-row > h6',
|
css: '.mm-box > h6',
|
||||||
});
|
});
|
||||||
assert.equal(
|
assert.equal(
|
||||||
await spendingCap.getText(),
|
await spendingCap.getText(),
|
||||||
@ -393,7 +393,7 @@ describe('Create token, approve token and approve token without gas', function (
|
|||||||
|
|
||||||
const maxSpendingCap = await driver.findElement({
|
const maxSpendingCap = await driver.findElement({
|
||||||
text: '10 TST',
|
text: '10 TST',
|
||||||
css: '.box--flex-direction-row > h6',
|
css: '.mm-box > h6',
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
|
@ -24,9 +24,7 @@ exports[`CustomSpendingCap should match snapshot 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
for="custom-spending-cap"
|
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
Custom spending cap
|
Custom spending cap
|
||||||
</h6>
|
</h6>
|
||||||
@ -76,18 +74,18 @@ exports[`CustomSpendingCap should match snapshot 1`] = `
|
|||||||
class="box custom-spending-cap__description box--flex-direction-row"
|
class="box custom-spending-cap__description box--flex-direction-row"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm box--padding-top-2 box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm mm-box--padding-top-2 mm-box--color-text-default"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
|
||||||
This allows the third party to spend
|
This allows the third party to spend
|
||||||
<h6
|
<span
|
||||||
class="box mm-text custom-spending-cap__input-value-and-token-name mm-text--body-sm-bold box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text custom-spending-cap__input-value-and-token-name mm-text--body-sm-bold mm-box--color-text-default"
|
||||||
>
|
>
|
||||||
7
|
7
|
||||||
|
|
||||||
TST
|
TST
|
||||||
</h6>
|
</span>
|
||||||
from your current balance.
|
from your current balance.
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
@ -8,8 +8,8 @@ import { addHexPrefix } from 'ethereumjs-util';
|
|||||||
import { I18nContext } from '../../../contexts/i18n';
|
import { I18nContext } from '../../../contexts/i18n';
|
||||||
import Box from '../../ui/box';
|
import Box from '../../ui/box';
|
||||||
import FormField from '../../ui/form-field';
|
import FormField from '../../ui/form-field';
|
||||||
import { ButtonLink, Icon, IconName } from '../../component-library';
|
import { ButtonLink, Icon, IconName, Text } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
import {
|
import {
|
||||||
AlignItems,
|
AlignItems,
|
||||||
TextAlign,
|
TextAlign,
|
||||||
@ -82,7 +82,7 @@ export default function CustomSpendingCap({
|
|||||||
<Text
|
<Text
|
||||||
key="custom-spending-cap"
|
key="custom-spending-cap"
|
||||||
variant={TextVariant.bodySmBold}
|
variant={TextVariant.bodySmBold}
|
||||||
as="h6"
|
as="span"
|
||||||
className="custom-spending-cap__input-value-and-token-name"
|
className="custom-spending-cap__input-value-and-token-name"
|
||||||
>
|
>
|
||||||
{replaceCommaToDot(inputNumber)} {tokenName}
|
{replaceCommaToDot(inputNumber)} {tokenName}
|
||||||
@ -197,7 +197,7 @@ export default function CustomSpendingCap({
|
|||||||
<Text
|
<Text
|
||||||
key="tooltip-text"
|
key="tooltip-text"
|
||||||
variant={TextVariant.bodySmBold}
|
variant={TextVariant.bodySmBold}
|
||||||
as="h6"
|
as="span"
|
||||||
color={TextColor.errorDefault}
|
color={TextColor.errorDefault}
|
||||||
>
|
>
|
||||||
<Icon name={IconName.Warning} /> {t('beCareful')}
|
<Icon name={IconName.Warning} /> {t('beCareful')}
|
||||||
|
@ -16,7 +16,7 @@ import {
|
|||||||
FlexWrap,
|
FlexWrap,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
|
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text } from '../../component-library';
|
||||||
|
|
||||||
import Box from './box';
|
import Box from './box';
|
||||||
|
|
||||||
|
@ -4,8 +4,7 @@ import classnames from 'classnames';
|
|||||||
import InfoIconInverted from '../icon/info-icon-inverted.component';
|
import InfoIconInverted from '../icon/info-icon-inverted.component';
|
||||||
import { Severity, TextColor } from '../../../helpers/constants/design-system';
|
import { Severity, TextColor } from '../../../helpers/constants/design-system';
|
||||||
import { MILLISECOND } from '../../../../shared/constants/time';
|
import { MILLISECOND } from '../../../../shared/constants/time';
|
||||||
import { ButtonIcon, IconName, IconSize } from '../../component-library';
|
import { ButtonIcon, IconName, IconSize, Text } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated `<Callout />` has been deprecated in favor of the `<BannerAlert />`
|
* @deprecated `<Callout />` has been deprecated in favor of the `<BannerAlert />`
|
||||||
|
@ -4,8 +4,8 @@ import {
|
|||||||
SEVERITIES,
|
SEVERITIES,
|
||||||
TextVariant,
|
TextVariant,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import Box from '../box';
|
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text, Box } from '../../component-library';
|
||||||
import Callout from './callout';
|
import Callout from './callout';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -12,8 +12,7 @@ import Box from '../box/box';
|
|||||||
import ActionableMessage from '../actionable-message/actionable-message';
|
import ActionableMessage from '../actionable-message/actionable-message';
|
||||||
import { getCurrentChainId } from '../../../selectors';
|
import { getCurrentChainId } from '../../../selectors';
|
||||||
import { getCompletedOnboarding } from '../../../ducks/metamask/metamask';
|
import { getCompletedOnboarding } from '../../../ducks/metamask/metamask';
|
||||||
import { Icon, IconName, IconSize } from '../../component-library';
|
import { Icon, IconName, IconSize, Text } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
|
|
||||||
export default function DeprecatedTestNetworks() {
|
export default function DeprecatedTestNetworks() {
|
||||||
const currentChainID = useSelector(getCurrentChainId);
|
const currentChainID = useSelector(getCurrentChainId);
|
||||||
|
@ -8,9 +8,13 @@ import {
|
|||||||
TextVariant,
|
TextVariant,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import { getAccountNameErrorMessage } from '../../../helpers/utils/accounts';
|
import { getAccountNameErrorMessage } from '../../../helpers/utils/accounts';
|
||||||
import { ButtonIcon, FormTextField, IconName } from '../../component-library';
|
import {
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
ButtonIcon,
|
||||||
import Box from '../box/box';
|
FormTextField,
|
||||||
|
IconName,
|
||||||
|
Text,
|
||||||
|
Box,
|
||||||
|
} from '../../component-library';
|
||||||
|
|
||||||
export default class EditableLabel extends Component {
|
export default class EditableLabel extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -6,14 +6,12 @@ import {
|
|||||||
AlignItems,
|
AlignItems,
|
||||||
BorderColor,
|
BorderColor,
|
||||||
BorderRadius,
|
BorderRadius,
|
||||||
DISPLAY,
|
Display,
|
||||||
FLEX_DIRECTION,
|
FlexDirection,
|
||||||
JustifyContent,
|
JustifyContent,
|
||||||
TextVariant,
|
TextVariant,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import Box from '../box/box';
|
import { ButtonSecondary, Text, Box } from '../../component-library';
|
||||||
import { ButtonSecondary } from '../../component-library';
|
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
|
|
||||||
function ExportTextContainer({ text = '', onClickCopy = null }) {
|
function ExportTextContainer({ text = '', onClickCopy = null }) {
|
||||||
const ONE_MINUTE = 1000 * 60;
|
const ONE_MINUTE = 1000 * 60;
|
||||||
@ -22,9 +20,9 @@ function ExportTextContainer({ text = '', onClickCopy = null }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
justifyContent={JustifyContent.center}
|
justifyContent={JustifyContent.center}
|
||||||
flexDirection={FLEX_DIRECTION.COLUMN}
|
flexDirection={FlexDirection.Column}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
borderColor={BorderColor.borderDefault}
|
borderColor={BorderColor.borderDefault}
|
||||||
borderRadius={BorderRadius.MD}
|
borderRadius={BorderRadius.MD}
|
||||||
@ -32,8 +30,8 @@ function ExportTextContainer({ text = '', onClickCopy = null }) {
|
|||||||
gap={4}
|
gap={4}
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
justifyContent={JustifyContent.CENTER}
|
justifyContent={JustifyContent.center}
|
||||||
className="notranslate"
|
className="notranslate"
|
||||||
variant={TextVariant.bodyLgMedium}
|
variant={TextVariant.bodyLgMedium}
|
||||||
data-testid="srp_text"
|
data-testid="srp_text"
|
||||||
|
@ -12,8 +12,7 @@ import {
|
|||||||
|
|
||||||
import NumericInput from '../numeric-input/numeric-input.component';
|
import NumericInput from '../numeric-input/numeric-input.component';
|
||||||
import InfoTooltip from '../info-tooltip/info-tooltip';
|
import InfoTooltip from '../info-tooltip/info-tooltip';
|
||||||
import { Box } from '../../component-library';
|
import { Text, Box } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated The `<FormField />` component has been deprecated in favor of the new `<FormTextField>` component from the component-library.
|
* @deprecated The `<FormField />` component has been deprecated in favor of the new `<FormTextField>` component from the component-library.
|
||||||
@ -70,10 +69,8 @@ export default function FormField({
|
|||||||
{TitleTextCustomComponent ||
|
{TitleTextCustomComponent ||
|
||||||
(titleText && (
|
(titleText && (
|
||||||
<Text
|
<Text
|
||||||
tag="label"
|
|
||||||
htmlFor={id}
|
|
||||||
variant={TextVariant.bodySmBold}
|
|
||||||
as="h6"
|
as="h6"
|
||||||
|
variant={TextVariant.bodySmBold}
|
||||||
display={Display.InlineBlock}
|
display={Display.InlineBlock}
|
||||||
>
|
>
|
||||||
{titleText}
|
{titleText}
|
||||||
@ -82,9 +79,8 @@ export default function FormField({
|
|||||||
{TitleUnitCustomComponent ||
|
{TitleUnitCustomComponent ||
|
||||||
(titleUnit && (
|
(titleUnit && (
|
||||||
<Text
|
<Text
|
||||||
tag={TextVariant.bodySm}
|
|
||||||
variant={TextVariant.bodySm}
|
|
||||||
as="h6"
|
as="h6"
|
||||||
|
variant={TextVariant.bodySm}
|
||||||
color={TextColor.textAlternative}
|
color={TextColor.textAlternative}
|
||||||
display={Display.InlineBlock}
|
display={Display.InlineBlock}
|
||||||
>
|
>
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import Tooltip from '../tooltip';
|
import Tooltip from '../tooltip';
|
||||||
|
|
||||||
import { Icon, IconName } from '../../component-library';
|
import { Icon, IconName, Text } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
import { AlignItems } from '../../../helpers/constants/design-system';
|
import { AlignItems } from '../../../helpers/constants/design-system';
|
||||||
import README from './README.mdx';
|
import README from './README.mdx';
|
||||||
import FormField from '.';
|
import FormField from '.';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text } from '../../component-library';
|
||||||
import { TextVariant } from '../../../helpers/constants/design-system';
|
import { TextVariant } from '../../../helpers/constants/design-system';
|
||||||
import Tooltip from '../tooltip/tooltip';
|
import Tooltip from '../tooltip/tooltip';
|
||||||
|
|
||||||
|
@ -2,10 +2,9 @@ import PropTypes from 'prop-types';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { BackgroundColor } from '../../../helpers/constants/design-system';
|
import { BackgroundColor } from '../../../helpers/constants/design-system';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text, Box } from '../../component-library';
|
||||||
|
|
||||||
import Card from '../card';
|
import Card from '../card';
|
||||||
import Box from '../box';
|
|
||||||
|
|
||||||
import LogoLedger from './logo-ledger';
|
import LogoLedger from './logo-ledger';
|
||||||
import LogoQRBased from './logo-qr-based';
|
import LogoQRBased from './logo-qr-based';
|
||||||
@ -16,7 +15,6 @@ import README from './README.mdx';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Components/UI/Logo',
|
title: 'Components/UI/Logo',
|
||||||
|
|
||||||
parameters: {
|
parameters: {
|
||||||
docs: {
|
docs: {
|
||||||
page: README,
|
page: README,
|
||||||
|
@ -2,8 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
import { Icon, IconSize } from '../../component-library';
|
import { Icon, IconSize, Text } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
import { TextVariant } from '../../../helpers/constants/design-system';
|
import { TextVariant } from '../../../helpers/constants/design-system';
|
||||||
|
|
||||||
const MenuItem = React.forwardRef(
|
const MenuItem = React.forwardRef(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text } from '../../component-library';
|
||||||
import MetaFoxLogo from '.';
|
import MetaFoxLogo from '.';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -25,8 +25,7 @@ import { IMPORT_TOKEN_ROUTE } from '../../../helpers/constants/routes';
|
|||||||
import Chip from '../chip/chip';
|
import Chip from '../chip/chip';
|
||||||
import { setFirstTimeUsedNetwork } from '../../../store/actions';
|
import { setFirstTimeUsedNetwork } from '../../../store/actions';
|
||||||
import { NETWORK_TYPES } from '../../../../shared/constants/network';
|
import { NETWORK_TYPES } from '../../../../shared/constants/network';
|
||||||
import { Icon, IconName } from '../../component-library';
|
import { Icon, IconName, Text } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
import { getNetworkLabelKey } from '../../../helpers/utils/i18n-helper';
|
import { getNetworkLabelKey } from '../../../helpers/utils/i18n-helper';
|
||||||
|
|
||||||
const NewNetworkInfo = () => {
|
const NewNetworkInfo = () => {
|
||||||
|
@ -1,27 +1,25 @@
|
|||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18nContext } from '../../../contexts/i18n';
|
import { I18nContext } from '../../../contexts/i18n';
|
||||||
import Box from '../box';
|
|
||||||
import {
|
import {
|
||||||
BackgroundColor,
|
BackgroundColor,
|
||||||
DISPLAY,
|
Display,
|
||||||
TextColor,
|
TextColor,
|
||||||
TextVariant,
|
TextVariant,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import Identicon from '../identicon';
|
import Identicon from '../identicon';
|
||||||
import Button from '../button';
|
import { Text, Button, Box, BUTTON_VARIANT } from '../../component-library';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
|
||||||
|
|
||||||
export default function NftInfo({ assetName, tokenAddress, tokenId }) {
|
export default function NftInfo({ assetName, tokenAddress, tokenId }) {
|
||||||
const t = useContext(I18nContext);
|
const t = useContext(I18nContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
className="nft-info"
|
className="nft-info"
|
||||||
backgroundColor={BackgroundColor.backgroundAlternative}
|
backgroundColor={BackgroundColor.backgroundAlternative}
|
||||||
>
|
>
|
||||||
<Box display={DISPLAY.FLEX} className="nft-info__content">
|
<Box display={Display.Flex} className="nft-info__content">
|
||||||
<Box margin={4}>
|
<Box margin={4}>
|
||||||
<Identicon address={tokenAddress} diameter={24} />
|
<Identicon address={tokenAddress} diameter={24} />
|
||||||
</Box>
|
</Box>
|
||||||
@ -40,15 +38,8 @@ export default function NftInfo({ assetName, tokenAddress, tokenId }) {
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<Box marginTop={4} marginRight={4}>
|
<Box marginTop={4} marginRight={4}>
|
||||||
<Button className="nft-info__button" type="link">
|
<Button className="nft-info__button" variant={BUTTON_VARIANT.LINK}>
|
||||||
<Text
|
{t('view')}
|
||||||
variant={TextVariant.bodySm}
|
|
||||||
as="h6"
|
|
||||||
marginTop={0}
|
|
||||||
color={TextColor.primaryDefault}
|
|
||||||
>
|
|
||||||
{t('view')}
|
|
||||||
</Text>
|
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
TextVariant,
|
TextVariant,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import { DECIMAL_REGEX } from '../../../../shared/constants/tokens';
|
import { DECIMAL_REGEX } from '../../../../shared/constants/tokens';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text } from '../../component-library';
|
||||||
|
|
||||||
export default function NumericInput({
|
export default function NumericInput({
|
||||||
detailText = '',
|
detailText = '',
|
||||||
|
@ -19,8 +19,13 @@ import {
|
|||||||
BLOCK_SIZES,
|
BLOCK_SIZES,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
|
|
||||||
import { ButtonIcon, Icon, IconName, IconSize } from '../../component-library';
|
import {
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
ButtonIcon,
|
||||||
|
Icon,
|
||||||
|
IconName,
|
||||||
|
IconSize,
|
||||||
|
Text,
|
||||||
|
} from '../../component-library';
|
||||||
|
|
||||||
const defaultHeaderProps = {
|
const defaultHeaderProps = {
|
||||||
padding: [6, 4, 4],
|
padding: [6, 4, 4],
|
||||||
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { I18nContext } from '../../../contexts/i18n';
|
import { I18nContext } from '../../../contexts/i18n';
|
||||||
import { Color, TextVariant } from '../../../helpers/constants/design-system';
|
import { Color, TextVariant } from '../../../helpers/constants/design-system';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text } from '../../component-library';
|
||||||
|
|
||||||
function Connector({ isFirst, isLast }) {
|
function Connector({ isFirst, isLast }) {
|
||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
|
@ -1,14 +1,20 @@
|
|||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { I18nContext } from '../../../contexts/i18n';
|
import { I18nContext } from '../../../contexts/i18n';
|
||||||
import Box from '../box';
|
|
||||||
import Tooltip from '../tooltip';
|
import Tooltip from '../tooltip';
|
||||||
import { ButtonLink, Icon, IconName, IconSize } from '../../component-library';
|
import {
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
ButtonLink,
|
||||||
|
Icon,
|
||||||
|
IconName,
|
||||||
|
IconSize,
|
||||||
|
Text,
|
||||||
|
Box,
|
||||||
|
} from '../../component-library';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlignItems,
|
AlignItems,
|
||||||
DISPLAY,
|
Display,
|
||||||
FLEX_DIRECTION,
|
FlexDirection,
|
||||||
TextVariant,
|
TextVariant,
|
||||||
TextAlign,
|
TextAlign,
|
||||||
Size,
|
Size,
|
||||||
@ -37,30 +43,30 @@ export default function ReviewSpendingCap({
|
|||||||
paddingTop={4}
|
paddingTop={4}
|
||||||
paddingRight={4}
|
paddingRight={4}
|
||||||
paddingLeft={4}
|
paddingLeft={4}
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.flexStart}
|
alignItems={AlignItems.flexStart}
|
||||||
flexDirection={FLEX_DIRECTION.COLUMN}
|
flexDirection={FlexDirection.Column}
|
||||||
backgroundColor={BackgroundColor.backgroundAlternative}
|
backgroundColor={BackgroundColor.backgroundAlternative}
|
||||||
gap={1}
|
gap={1}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
flexDirection={FLEX_DIRECTION.ROW}
|
flexDirection={FlexDirection.Row}
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
className="review-spending-cap__heading"
|
className="review-spending-cap__heading"
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
flexDirection={FLEX_DIRECTION.ROW}
|
flexDirection={FlexDirection.Row}
|
||||||
className="review-spending-cap__heading-title"
|
className="review-spending-cap__heading-title"
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
variant={TextVariant.bodySmBold}
|
variant={TextVariant.bodySmBold}
|
||||||
as="h6"
|
as="h6"
|
||||||
display={DISPLAY.INLINE_BLOCK}
|
display={Display.InlineBlock}
|
||||||
>
|
>
|
||||||
{t('dappRequestedSpendingCap')}
|
{t('dappRequestedSpendingCap')}
|
||||||
</Text>
|
</Text>
|
||||||
<Box marginLeft={2} display={DISPLAY.INLINE_BLOCK}>
|
<Box marginLeft={2} display={Display.InlineBlock}>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
interactive
|
interactive
|
||||||
position="top"
|
position="top"
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
|
|
||||||
import InfoTooltip from '../info-tooltip/info-tooltip';
|
import InfoTooltip from '../info-tooltip/info-tooltip';
|
||||||
import { Text } from '../../component-library/text/deprecated';
|
import { Text } from '../../component-library';
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
root: {
|
root: {
|
||||||
|
@ -14,8 +14,7 @@ import {
|
|||||||
FLEX_WRAP,
|
FLEX_WRAP,
|
||||||
TextVariant,
|
TextVariant,
|
||||||
} from '../../../../../helpers/constants/design-system';
|
} from '../../../../../helpers/constants/design-system';
|
||||||
import { Icon, IconName, IconSize } from '../../../../component-library';
|
import { Icon, IconName, IconSize, Text } from '../../../../component-library';
|
||||||
import { Text } from '../../../../component-library/text/deprecated';
|
|
||||||
|
|
||||||
export const DropdownTab = ({
|
export const DropdownTab = ({
|
||||||
activeClassName,
|
activeClassName,
|
||||||
|
@ -407,7 +407,7 @@ exports[`add-ethereum-chain confirmation should match snapshot 2`] = `
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<p
|
<p
|
||||||
class="box mm-text callout__content mm-text--body-md box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text callout__content mm-text--body-md mm-box--color-text-default"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
This custom network is not recognized
|
This custom network is not recognized
|
||||||
@ -438,7 +438,7 @@ exports[`add-ethereum-chain confirmation should match snapshot 2`] = `
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<p
|
<p
|
||||||
class="box mm-text callout__content mm-text--body-md box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text callout__content mm-text--body-md mm-box--color-text-default"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<span>
|
<span>
|
||||||
|
@ -241,7 +241,7 @@ exports[`switch-ethereum-chain confirmation should show alert if there are pendi
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<p
|
<p
|
||||||
class="box mm-text callout__content mm-text--body-md box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text callout__content mm-text--body-md mm-box--color-text-default"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
Switching networks will cancel all pending confirmations
|
Switching networks will cancel all pending confirmations
|
||||||
|
@ -49,8 +49,7 @@ exports[`Add Network Modal should render 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
Network name
|
Network name
|
||||||
</h6>
|
</h6>
|
||||||
@ -80,8 +79,7 @@ exports[`Add Network Modal should render 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
New RPC URL
|
New RPC URL
|
||||||
</h6>
|
</h6>
|
||||||
@ -111,8 +109,7 @@ exports[`Add Network Modal should render 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
Chain ID
|
Chain ID
|
||||||
</h6>
|
</h6>
|
||||||
@ -167,8 +164,7 @@ exports[`Add Network Modal should render 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
Currency symbol
|
Currency symbol
|
||||||
</h6>
|
</h6>
|
||||||
@ -198,14 +194,12 @@ exports[`Add Network Modal should render 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
Block explorer URL
|
Block explorer URL
|
||||||
</h6>
|
</h6>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm box--display-inline-block box--flex-direction-row box--color-text-alternative"
|
class="mm-box mm-text mm-text--body-sm mm-box--display-inline-block mm-box--color-text-alternative"
|
||||||
tag="body-sm"
|
|
||||||
>
|
>
|
||||||
(Optional)
|
(Optional)
|
||||||
</h6>
|
</h6>
|
||||||
|
@ -58,8 +58,7 @@ exports[`Onboarding Create Password Render should match snapshot 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
New password (8 characters min)
|
New password (8 characters min)
|
||||||
</h6>
|
</h6>
|
||||||
@ -105,8 +104,7 @@ exports[`Onboarding Create Password Render should match snapshot 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
Confirm password
|
Confirm password
|
||||||
</h6>
|
</h6>
|
||||||
|
@ -365,9 +365,7 @@ exports[`TokenAllowancePage should match snapshot 1`] = `
|
|||||||
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
class="mm-box form-field__heading-title mm-box--display-flex mm-box--align-items-baseline"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm-bold box--display-inline-block box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm-bold mm-box--display-inline-block mm-box--color-text-default"
|
||||||
for="custom-spending-cap"
|
|
||||||
tag="label"
|
|
||||||
>
|
>
|
||||||
Custom spending cap
|
Custom spending cap
|
||||||
</h6>
|
</h6>
|
||||||
@ -417,18 +415,18 @@ exports[`TokenAllowancePage should match snapshot 1`] = `
|
|||||||
class="box custom-spending-cap__description box--flex-direction-row"
|
class="box custom-spending-cap__description box--flex-direction-row"
|
||||||
>
|
>
|
||||||
<h6
|
<h6
|
||||||
class="box mm-text mm-text--body-sm box--padding-top-2 box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text mm-text--body-sm mm-box--padding-top-2 mm-box--color-text-default"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
|
||||||
This allows the third party to spend
|
This allows the third party to spend
|
||||||
<h6
|
<span
|
||||||
class="box mm-text custom-spending-cap__input-value-and-token-name mm-text--body-sm-bold box--flex-direction-row box--color-text-default"
|
class="mm-box mm-text custom-spending-cap__input-value-and-token-name mm-text--body-sm-bold mm-box--color-text-default"
|
||||||
>
|
>
|
||||||
7
|
7
|
||||||
|
|
||||||
TST
|
TST
|
||||||
</h6>
|
</span>
|
||||||
from your current balance.
|
from your current balance.
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user