2022-04-01 15:59:46 +02:00
|
|
|
import React from 'react';
|
2023-05-06 23:04:20 +02:00
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import testData from '../../../../../.storybook/test-data';
|
|
|
|
import configureStore from '../../../../store/store';
|
|
|
|
import ExportPrivateKeyModal from './export-private-key-modal.component';
|
|
|
|
|
|
|
|
// Using Test Data For Redux
|
|
|
|
const store = configureStore(testData);
|
2022-04-01 15:59:46 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Components/App/Modals/ExportPrivateKeyModal',
|
2023-05-06 23:04:20 +02:00
|
|
|
decorators: [(story) => <Provider store={store}>{story()}</Provider>],
|
|
|
|
argsTypes: {
|
|
|
|
exportAccount: { action: 'exportAccount' },
|
|
|
|
},
|
2022-04-01 15:59:46 +02:00
|
|
|
};
|
|
|
|
|
2023-05-06 23:04:20 +02:00
|
|
|
export const DefaultStory = () => {
|
|
|
|
return (
|
|
|
|
<ExportPrivateKeyModal
|
|
|
|
// mock actions
|
|
|
|
exportAccount={() => {
|
|
|
|
return 'mockPrivateKey';
|
|
|
|
}}
|
|
|
|
selectedIdentity={
|
|
|
|
testData.metamask.identities[testData.metamask.selectedAddress]
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|
2022-04-01 15:59:46 +02:00
|
|
|
|
|
|
|
DefaultStory.storyName = 'Default';
|