mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Replacing deprecated constants & creating stories (#19686)
* Replacing deprecated constants & creating stories * updating snapshot
This commit is contained in:
parent
fc2402df5e
commit
1c7c89abcb
@ -0,0 +1,19 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import ConfirmGasDisplay from './confirm-gas-display';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Components/App/ConfirmGasDisplay',
|
||||||
|
component: ConfirmGasDisplay,
|
||||||
|
argTypes: {
|
||||||
|
userAcknowledgedGasMissing: {
|
||||||
|
control: 'boolean',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
args: {
|
||||||
|
userAcknowledgedGasMissing: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const DefaultStory = (args) => <ConfirmGasDisplay {...args} />;
|
||||||
|
|
||||||
|
DefaultStory.storyName = 'Default';
|
@ -0,0 +1,25 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import ConnectedAccountsPermissions from './connected-accounts-permissions';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Components/App/ConnectedAccountsPermissions',
|
||||||
|
component: ConnectedAccountsPermissions,
|
||||||
|
argTypes: {
|
||||||
|
permission: {
|
||||||
|
control: 'array',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
args: {
|
||||||
|
permissions: [
|
||||||
|
{ key: 'permission1' },
|
||||||
|
{ key: 'permission2' },
|
||||||
|
{ key: 'permission3' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const DefaultStory = (args) => (
|
||||||
|
<ConnectedAccountsPermissions {...args} />
|
||||||
|
);
|
||||||
|
|
||||||
|
DefaultStory.storyName = 'Default';
|
@ -3,10 +3,10 @@
|
|||||||
exports[`ComplianceDetails should render correctly 1`] = `
|
exports[`ComplianceDetails should render correctly 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="box compliance-details box--padding-right-4 box--padding-left-4 box--display-flex box--flex-direction-column"
|
class="mm-box compliance-details mm-box--padding-right-4 mm-box--padding-left-4 mm-box--display-flex mm-box--flex-direction-column"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="box compliance-details__row box--padding-top-4 box--padding-bottom-4 box--display-flex box--flex-direction-column box--justify-content-center box--height-2/3"
|
class="mm-box compliance-details__row mm-box--padding-top-4 mm-box--padding-bottom-4 mm-box--display-flex mm-box--flex-direction-column mm-box--justify-content-center mm-box--height-2/3"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
|
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
|
||||||
@ -20,10 +20,10 @@ exports[`ComplianceDetails should render correctly 1`] = `
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="box compliance-details__row box--padding-top-4 box--padding-bottom-4 box--display-flex box--flex-direction-column box--justify-content-center box--height-2/3"
|
class="mm-box compliance-details__row mm-box--padding-top-4 mm-box--padding-bottom-4 mm-box--display-flex mm-box--flex-direction-column mm-box--justify-content-center mm-box--height-2/3"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="box box--margin-bottom-1 box--display-flex box--flex-direction-row box--align-items-center box--color-text-alternative"
|
class="mm-box mm-box--margin-bottom-1 mm-box--display-flex mm-box--align-items-center mm-box--color-text-alternative"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
class="box mm-text mm-text--body-md box--margin-right-2 box--flex-direction-row box--color-text-default"
|
class="box mm-text mm-text--body-md box--margin-right-2 box--flex-direction-row box--color-text-default"
|
||||||
@ -57,7 +57,7 @@ exports[`ComplianceDetails should render correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="box compliance-row__column-risk compliance-row__column-risk--green box--flex-direction-row"
|
class="mm-box compliance-row__column-risk compliance-row__column-risk--green"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
|
class="box mm-text mm-text--body-md box--flex-direction-row box--color-text-default"
|
||||||
@ -67,10 +67,10 @@ exports[`ComplianceDetails should render correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="box compliance-details__row box--padding-top-4 box--padding-bottom-4 box--display-flex box--flex-direction-column box--justify-content-center box--height-2/3"
|
class="mm-box compliance-details__row mm-box--padding-top-4 mm-box--padding-bottom-4 mm-box--display-flex mm-box--flex-direction-column mm-box--justify-content-center mm-box--height-2/3"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="box box--display-flex box--flex-direction-row box--align-items-center box--color-text-alternative"
|
class="mm-box mm-box--display-flex mm-box--align-items-center mm-box--color-text-alternative"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
class="box mm-text mm-text--body-md box--margin-right-2 box--flex-direction-row box--color-text-default"
|
class="box mm-text mm-text--body-md box--margin-right-2 box--flex-direction-row box--color-text-default"
|
||||||
@ -108,7 +108,7 @@ exports[`ComplianceDetails should render correctly 1`] = `
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="box box--flex-direction-row"
|
class="mm-box"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="swaps-footer"
|
class="swaps-footer"
|
||||||
|
@ -11,16 +11,15 @@ import {
|
|||||||
getComplianceTenantSubdomain,
|
getComplianceTenantSubdomain,
|
||||||
} from '../../../ducks/institutional/institutional';
|
} from '../../../ducks/institutional/institutional';
|
||||||
import { formatDate } from '../../../helpers/utils/util';
|
import { formatDate } from '../../../helpers/utils/util';
|
||||||
import Box from '../../ui/box';
|
import { Text, Box } from '../../component-library';
|
||||||
import { Text } from '../../component-library';
|
|
||||||
import {
|
import {
|
||||||
TextColor,
|
TextColor,
|
||||||
TextVariant,
|
TextVariant,
|
||||||
JustifyContent,
|
JustifyContent,
|
||||||
AlignItems,
|
AlignItems,
|
||||||
BLOCK_SIZES,
|
BlockSize,
|
||||||
DISPLAY,
|
Display,
|
||||||
FLEX_DIRECTION,
|
FlexDirection,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
|
|
||||||
const ComplianceDetails = ({ address, onClose, onGenerate }) => {
|
const ComplianceDetails = ({ address, onClose, onGenerate }) => {
|
||||||
@ -50,17 +49,17 @@ const ComplianceDetails = ({ address, onClose, onGenerate }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
flexDirection={FLEX_DIRECTION.COLUMN}
|
flexDirection={FlexDirection.Column}
|
||||||
paddingLeft={4}
|
paddingLeft={4}
|
||||||
paddingRight={4}
|
paddingRight={4}
|
||||||
className="compliance-details"
|
className="compliance-details"
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
flexDirection={FLEX_DIRECTION.COLUMN}
|
flexDirection={FlexDirection.Column}
|
||||||
justifyContent={JustifyContent.center}
|
justifyContent={JustifyContent.center}
|
||||||
height={BLOCK_SIZES.TWO_THIRDS}
|
height={BlockSize.TwoThirds}
|
||||||
paddingTop={4}
|
paddingTop={4}
|
||||||
paddingBottom={4}
|
paddingBottom={4}
|
||||||
className="compliance-details__row"
|
className="compliance-details__row"
|
||||||
@ -69,16 +68,16 @@ const ComplianceDetails = ({ address, onClose, onGenerate }) => {
|
|||||||
<Text variant={TextVariant.bodyXs}>{address}</Text>
|
<Text variant={TextVariant.bodyXs}>{address}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
flexDirection={FLEX_DIRECTION.COLUMN}
|
flexDirection={FlexDirection.Column}
|
||||||
justifyContent={JustifyContent.center}
|
justifyContent={JustifyContent.center}
|
||||||
height={BLOCK_SIZES.TWO_THIRDS}
|
height={BlockSize.TwoThirds}
|
||||||
paddingTop={4}
|
paddingTop={4}
|
||||||
paddingBottom={4}
|
paddingBottom={4}
|
||||||
className="compliance-details__row"
|
className="compliance-details__row"
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
marginBottom={1}
|
marginBottom={1}
|
||||||
color={TextColor.textAlternative}
|
color={TextColor.textAlternative}
|
||||||
@ -103,16 +102,16 @@ const ComplianceDetails = ({ address, onClose, onGenerate }) => {
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
flexDirection={FLEX_DIRECTION.COLUMN}
|
flexDirection={FlexDirection.Column}
|
||||||
justifyContent={JustifyContent.center}
|
justifyContent={JustifyContent.center}
|
||||||
height={BLOCK_SIZES.TWO_THIRDS}
|
height={BlockSize.TwoThirds}
|
||||||
paddingTop={4}
|
paddingTop={4}
|
||||||
paddingBottom={4}
|
paddingBottom={4}
|
||||||
className="compliance-details__row"
|
className="compliance-details__row"
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
color={TextColor.textAlternative}
|
color={TextColor.textAlternative}
|
||||||
>
|
>
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Box from '../../ui/box/box';
|
|
||||||
import {
|
import {
|
||||||
AlignItems,
|
AlignItems,
|
||||||
BLOCK_SIZES,
|
BlockSize,
|
||||||
BorderRadius,
|
BorderRadius,
|
||||||
BackgroundColor,
|
BackgroundColor,
|
||||||
DISPLAY,
|
Display,
|
||||||
IconColor,
|
IconColor,
|
||||||
JustifyContent,
|
JustifyContent,
|
||||||
Size,
|
Size,
|
||||||
@ -20,6 +19,7 @@ import {
|
|||||||
ButtonIcon,
|
ButtonIcon,
|
||||||
IconName,
|
IconName,
|
||||||
Text,
|
Text,
|
||||||
|
Box,
|
||||||
} from '../../component-library';
|
} from '../../component-library';
|
||||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||||
import { Menu } from '../../ui/menu';
|
import { Menu } from '../../ui/menu';
|
||||||
@ -63,13 +63,13 @@ export const ProductTour = ({
|
|||||||
<Box
|
<Box
|
||||||
borderWidth={1}
|
borderWidth={1}
|
||||||
className="multichain-product-tour-menu__arrow"
|
className="multichain-product-tour-menu__arrow"
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
justifyContent={JustifyContent.center}
|
justifyContent={JustifyContent.center}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
style={{ right: positionObj }}
|
style={{ right: positionObj }}
|
||||||
/>
|
/>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
className="multichain-product-tour-menu__header"
|
className="multichain-product-tour-menu__header"
|
||||||
>
|
>
|
||||||
@ -86,7 +86,7 @@ export const ProductTour = ({
|
|||||||
<Text
|
<Text
|
||||||
textAlign={TextAlign.Center}
|
textAlign={TextAlign.Center}
|
||||||
variant={TextVariant.headingSm}
|
variant={TextVariant.headingSm}
|
||||||
width={BLOCK_SIZES.FULL}
|
width={BlockSize.Full}
|
||||||
color={TextColor.infoInverse}
|
color={TextColor.infoInverse}
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
@ -101,7 +101,7 @@ export const ProductTour = ({
|
|||||||
{description}
|
{description}
|
||||||
</Text>
|
</Text>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
justifyContent={JustifyContent.spaceBetween}
|
justifyContent={JustifyContent.spaceBetween}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user