mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-01 21:57:06 +01:00
5bc0ba7f3a
* moved import nft to modal * fixed modal state * updated port-nft-popup * updated onChange for import nft modal * updated tests * updated tests * updated tests * added story and updated spec file * updated spec file * updated spec file * updated spec file for import-nft * added focus to form field * added autofocus to tokenId
39 lines
917 B
JavaScript
39 lines
917 B
JavaScript
import React from 'react';
|
|
import { Provider } from 'react-redux';
|
|
import configureStore from '../../../store/store';
|
|
import testData from '../../../../.storybook/test-data';
|
|
import { CHAIN_IDS } from '../../../../shared/constants/network';
|
|
import { ImportNftsModal } from '.';
|
|
|
|
const createStore = (chainId = CHAIN_IDS.MAINNET, useTokenDetection = true) => {
|
|
return configureStore({
|
|
...testData,
|
|
metamask: {
|
|
...testData.metamask,
|
|
useTokenDetection,
|
|
providerConfig: { chainId },
|
|
},
|
|
});
|
|
};
|
|
|
|
export default {
|
|
title: 'Components/Multichain/ImportNftsModal',
|
|
component: ImportNftsModal,
|
|
argTypes: {
|
|
onClose: {
|
|
action: 'onClose',
|
|
},
|
|
},
|
|
};
|
|
|
|
export const DefaultStory = (args) => <ImportNftsModal {...args} />;
|
|
DefaultStory.decorators = [
|
|
(Story) => (
|
|
<Provider store={createStore()}>
|
|
<Story />
|
|
</Provider>
|
|
),
|
|
];
|
|
|
|
DefaultStory.storyName = 'Default';
|