From 9ce966ba1df7690292632a4f22b6f45f94bcf5ac Mon Sep 17 00:00:00 2001 From: George Marshall Date: Thu, 7 Apr 2022 08:14:22 -0700 Subject: [PATCH] =?UTF-8?q?Storybook=20housekeeping=20=F0=9F=A7=B9=20=20(#?= =?UTF-8?q?14331)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removing argTypes that are related to static props and don't have anything to do with the component. Also some general house keeping * updates --- .../app/app-header/app-header.stories.js | 24 ---------------- .../confirm-remove-account.stories.js | 16 ----------- .../export-private-key-modal.stories.js | 28 +------------------ ...er-preferenced-currency-display.stories.js | 3 ++ .../reveal-seed-phrase.stories.js | 2 +- .../redirect/permissions-redirect.stories.js | 2 +- .../smart-transaction-status.stories.js | 2 +- 7 files changed, 7 insertions(+), 70 deletions(-) diff --git a/ui/components/app/app-header/app-header.stories.js b/ui/components/app/app-header/app-header.stories.js index f783fd3e2..989e2997a 100644 --- a/ui/components/app/app-header/app-header.stories.js +++ b/ui/components/app/app-header/app-header.stories.js @@ -5,27 +5,6 @@ export default { title: 'Components/App/AppHeader', id: __filename, argTypes: { - history: { - control: 'object', - }, - networkDropdownOpen: { - control: 'boolean', - }, - showNetworkDropdown: { - action: 'showNetworkDropdown', - }, - hideNetworkDropdown: { - action: 'hideNetworkDropdown', - }, - toggleAccountMenu: { - action: 'toggleAccountMenu', - }, - selectedAddress: { - control: 'text', - }, - isUnlocked: { - control: 'boolean', - }, hideNetworkIndicator: { control: 'boolean', }, @@ -35,9 +14,6 @@ export default { disableNetworkIndicator: { control: 'boolean', }, - isAccountMenuOpen: { - control: 'boolean', - }, onClick: { action: 'onClick', }, diff --git a/ui/components/app/modals/confirm-remove-account/confirm-remove-account.stories.js b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.stories.js index 7bd6779aa..aee9bfc3e 100644 --- a/ui/components/app/modals/confirm-remove-account/confirm-remove-account.stories.js +++ b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.stories.js @@ -6,30 +6,14 @@ export default { id: __filename, component: ConfirmRemoveAccount, argTypes: { - hideModal: { - action: 'hideModal', - }, - removeAccount: { - action: 'removeAccount', - }, identity: { control: 'object', }, - chainId: { - control: 'text', - }, - rpcPrefs: { - control: 'object', - }, }, args: { identity: { control: 'object', }, - chainId: 'chainId', - rpcPrefs: { - control: 'object', - }, }, }; diff --git a/ui/components/app/modals/export-private-key-modal/export-private-key-modal.stories.js b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.stories.js index 74901533b..60a947f41 100644 --- a/ui/components/app/modals/export-private-key-modal/export-private-key-modal.stories.js +++ b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.stories.js @@ -4,34 +4,8 @@ import ExportPrivateKeyModal from '.'; export default { title: 'Components/App/Modals/ExportPrivateKeyModal', id: __filename, - argTypes: { - exportAccount: { - action: 'exportAccount', - }, - selectedIdentity: { - control: 'object', - }, - warning: { - control: 'node', - }, - showAccountDetailModal: { - action: 'showAccountDetailModal', - }, - hideModal: { - action: 'hideModal', - }, - hideWarning: { - action: 'hideWarning', - }, - clearAccountDetails: { - action: 'clearAccountDetails', - }, - previousModalState: { - control: 'text', - }, - }, }; -export const DefaultStory = (args) => ; +export const DefaultStory = () => ; DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.stories.js b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.stories.js index 0fcdf1f9f..663ec82cf 100644 --- a/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.stories.js +++ b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.stories.js @@ -47,6 +47,9 @@ export default { fiatNumberOfDecimals: { control: 'number', }, + showFiat: { + control: 'boolean', + }, }, args: { type: ETH, diff --git a/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.stories.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.stories.js index 32c7f4136..1176ef6a1 100644 --- a/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.stories.js +++ b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.stories.js @@ -2,7 +2,7 @@ import React from 'react'; import RevealSeedPhrase from '.'; export default { - title: 'Components/Pages/FirstTimeFlow/RevealSeedPhrase', + title: 'Pages/FirstTimeFlow/RevealSeedPhrase', id: __filename, }; diff --git a/ui/pages/permissions-connect/redirect/permissions-redirect.stories.js b/ui/pages/permissions-connect/redirect/permissions-redirect.stories.js index ed952082d..6624d946c 100644 --- a/ui/pages/permissions-connect/redirect/permissions-redirect.stories.js +++ b/ui/pages/permissions-connect/redirect/permissions-redirect.stories.js @@ -2,7 +2,7 @@ import React from 'react'; import PermissionsRedirect from '.'; export default { - title: 'Components/Pages/PermissionsConnect/Redirect/PermissionsRedirect', + title: 'Pages/PermissionsConnect/Redirect/PermissionsRedirect', id: __filename, argTypes: { subjectMetadata: { diff --git a/ui/pages/swaps/smart-transaction-status/smart-transaction-status.stories.js b/ui/pages/swaps/smart-transaction-status/smart-transaction-status.stories.js index ce93a3717..7a5c363d7 100644 --- a/ui/pages/swaps/smart-transaction-status/smart-transaction-status.stories.js +++ b/ui/pages/swaps/smart-transaction-status/smart-transaction-status.stories.js @@ -2,7 +2,7 @@ import React from 'react'; import SmartTransactionStatus from './smart-transaction-status'; export default { - title: 'SmartTransactionStatus', + title: 'Pages/Swaps/SmartTransactionStatus', }; export const SmartTransactionStatusComponent = () => {