1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fixing broken stories (#17227)

This commit is contained in:
ryanml 2023-01-17 18:42:02 -07:00 committed by GitHub
parent 7d77554f3b
commit a276208891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 2 deletions

View File

@ -1463,6 +1463,7 @@ const state = {
version: '0.6.0', version: '0.6.0',
}, },
}, },
notifications: {},
}, },
appState: { appState: {
shouldClose: false, shouldClose: false,

View File

@ -16,6 +16,7 @@ export default {
handleTokenSelection: { control: 'func' }, handleTokenSelection: { control: 'func' },
onImport: { control: 'func' }, onImport: { control: 'func' },
onIgnoreAll: { control: 'func' }, onIgnoreAll: { control: 'func' },
sortingBasedOnTokenSelection: { control: 'func' },
}, },
args: { args: {
tokensListDetected: { tokensListDetected: {
@ -57,6 +58,7 @@ export default {
selected: true, selected: true,
}, },
}, },
sortingBasedOnTokenSelection: () => [],
}, },
}; };

View File

@ -5,10 +5,20 @@ import NewAccountCreateForm from './new-account.component';
export default { export default {
title: 'Pages/CreateAccount/NewAccount', title: 'Pages/CreateAccount/NewAccount',
id: __filename, id: __filename,
argTypes: {
accounts: {
control: 'array',
},
},
args: {
accounts: [],
},
}; };
export const DefaultStory = () => { export const DefaultStory = (args) => {
return <NewAccountCreateForm createAccount={action('Account Created')} />; return (
<NewAccountCreateForm {...args} createAccount={action('Account Created')} />
);
}; };
DefaultStory.storyName = 'Default'; DefaultStory.storyName = 'Default';

View File

@ -31,6 +31,7 @@ export const DefaultStory = () => {
updateSendErrors={() => undefined} updateSendErrors={() => undefined}
updateSendAsset={() => undefined} updateSendAsset={() => undefined}
updateTokenType={(type) => action(`Selected Token: ${type}`)()} updateTokenType={(type) => action(`Selected Token: ${type}`)()}
sendAsset={{}}
/> />
); );
}; };