From 189cdffe722558ff4b9cca7fb7c2e8134169ba2b Mon Sep 17 00:00:00 2001 From: dpundir Date: Thu, 20 Apr 2023 12:43:17 +0530 Subject: [PATCH 1/2] Update knobs to control: MetamaskTemplateRenderer --- .../metamask-template-renderer.stories.js | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js index a1f7822401a7..4530829187e1 100644 --- a/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js +++ b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js @@ -1,5 +1,5 @@ + import React from 'react'; -import { object } from '@storybook/addon-knobs'; import { TextColor, TypographyVariant, @@ -8,6 +8,12 @@ import MetaMaskTemplateRenderer from '.'; export default { title: 'Components/App/MetamaskTemplateRenderer', + component: MetaMaskTemplateRenderer, + argTypes: { + sections: { + control: 'object', + }, + }, }; const SECTIONS = { @@ -85,25 +91,12 @@ const SECTIONS = { ], }; -export const DefaultStory = () => ( - +export const DefaultStory = (args) => ( + ); DefaultStory.storyName = 'Default'; -export const WithInvalidElement = () => ( - -); +DefaultStory.args = { + sections: SECTIONS +}; From 39494ef461886948452f6fd022dce97729c3213c Mon Sep 17 00:00:00 2001 From: dpundir Date: Thu, 20 Apr 2023 20:36:26 +0530 Subject: [PATCH 2/2] Run lint --- .../metamask-template-renderer.stories.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js index 4530829187e1..c494fae2b797 100644 --- a/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js +++ b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js @@ -1,4 +1,3 @@ - import React from 'react'; import { TextColor, @@ -98,5 +97,5 @@ export const DefaultStory = (args) => ( DefaultStory.storyName = 'Default'; DefaultStory.args = { - sections: SECTIONS + sections: SECTIONS, };