Skip to content

Commit

Permalink
Fixing import errors, linting errors and adding a story
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewrmarshall committed Mar 6, 2023
1 parent ca61978 commit 6c127e8
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { getIpfsGateway } from '../../../../../selectors';
import Identicon from '../../../../ui/identicon';
import InfoTooltip from '../../../../ui/info-tooltip';
import NicknamePopovers from '../../../modals/nickname-popovers';
import { Text } from '../../component-library'
import { TextVariant } from '../../../helpers/constants/design-system'
import { Text } from '../../../../component-library';
import { TextVariant } from '../../../../../helpers/constants/design-system';
import { ORIGIN_METAMASK } from '../../../../../../shared/constants/app';
import SiteOrigin from '../../../../ui/site-origin';
import { getAssetImageURL } from '../../../../../helpers/utils/util';
Expand Down Expand Up @@ -138,7 +138,7 @@ const ConfirmPageContainerSummary = (props) => {
? TextVariant.displayMd
: TextVariant.headingMd
}
as={ title && title.length < 10 ? "h1" : "h3"}
as={title && title.length < 10 ? 'h1' : 'h3'}
title={title}
>
{titleComponent || title}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import React from 'react';
import ConfirmPageContainerSummary from '.';

export default {
title: 'Components/UI/ConfirmPageContainerSummary', // title should follow the folder structure location of the component. Don't use spaces.
argTypes: {
action: {
control: 'text',
},
title: {
control: 'text',
},
image: {
control: 'text',
},
titleComponent: {
control: 'text',
},
subtitleComponent: {
control: 'text',
},
hideSubtitle: {
control: 'boolean',
},
className: {
control: 'text',
},
tokenAddress: {
control: 'text',
},
toAddress: {
control: 'text',
},
nonce: {
control: 'text',
},
origin: {
control: 'text',
},
hideTitle: {
control: 'boolean',
},
transactionType: {
control: 'text',
},
},
args: {
action: 'action',
title: 'title',
titleComponent: 'titleComponent',
subtitleComponent: 'subtitleComponent',
className: 'className',
tokenAddress: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
toAddress: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
nonce: 'nonce',
origin: 'origin',
hideTitle: 'hideTitle',
transactionType: 'transactionType',
},
};

export const DefaultStory = (args) => <ConfirmPageContainerSummary {...args} />;

DefaultStory.storyName = 'Default';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

import Preloader from '../../../ui/icon/preloader/preloader-icon.component';
import { Text } from '../../component-library'
import { Text } from '../../../component-library';
import {
AlignItems,
FLEX_DIRECTION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import Popover from '../../ui/popover';
import Box from '../../ui/box';
import Button from '../../ui/button';
import { Text } from '../../component-library';
import {
DISPLAY,
FLEX_DIRECTION,
Expand All @@ -15,7 +14,7 @@ import {
AlignItems,
IconColor,
} from '../../../helpers/constants/design-system';
import { Icon, ICON_NAMES, ICON_SIZES } from '../../component-library';
import { Text, Icon, ICON_NAMES, ICON_SIZES } from '../../component-library';

const ConfirmationWarningModal = ({ onSubmit, onCancel }) => {
const t = useI18nContext();
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';
import SrpInput from '../srp-input';
import { PASSWORD_MIN_LENGTH } from '../../../helpers/constants/common';

Expand Down

0 comments on commit 6c127e8

Please sign in to comment.