From 1c7c89abcb0b54da7e1f8980268f3c95508f37fe Mon Sep 17 00:00:00 2001 From: Dhruv <79097544+dhruvv173@users.noreply.github.com> Date: Sat, 24 Jun 2023 03:08:40 +0530 Subject: [PATCH] Replacing deprecated constants & creating stories (#19686) * Replacing deprecated constants & creating stories * updating snapshot --- .../confirm-gas-display.stories.js | 19 ++++++++++ .../connected-account-permissions.stories.js | 25 +++++++++++++ .../compliance-details.test.js.snap | 16 ++++----- .../compliance-details/compliance-details.js | 35 +++++++++---------- .../product-tour-popover.js | 14 ++++---- 5 files changed, 76 insertions(+), 33 deletions(-) create mode 100644 ui/components/app/confirm-gas-display/confirm-gas-display.stories.js create mode 100644 ui/components/app/connected-accounts-permissions/connected-account-permissions.stories.js diff --git a/ui/components/app/confirm-gas-display/confirm-gas-display.stories.js b/ui/components/app/confirm-gas-display/confirm-gas-display.stories.js new file mode 100644 index 000000000..a8def4fc4 --- /dev/null +++ b/ui/components/app/confirm-gas-display/confirm-gas-display.stories.js @@ -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) => ; + +DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/connected-accounts-permissions/connected-account-permissions.stories.js b/ui/components/app/connected-accounts-permissions/connected-account-permissions.stories.js new file mode 100644 index 000000000..228abcc97 --- /dev/null +++ b/ui/components/app/connected-accounts-permissions/connected-account-permissions.stories.js @@ -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) => ( + +); + +DefaultStory.storyName = 'Default'; diff --git a/ui/components/institutional/compliance-details/__snapshots__/compliance-details.test.js.snap b/ui/components/institutional/compliance-details/__snapshots__/compliance-details.test.js.snap index bd4b24a02..36420ca9f 100644 --- a/ui/components/institutional/compliance-details/__snapshots__/compliance-details.test.js.snap +++ b/ui/components/institutional/compliance-details/__snapshots__/compliance-details.test.js.snap @@ -3,10 +3,10 @@ exports[`ComplianceDetails should render correctly 1`] = `