1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 15:50:28 +01:00
metamask-extension/ui/components/app/modals/export-private-key-modal/export-private-key-modal.stories.js
Monte Lai 0306422bbf
Add reveal to export private key (#18170)
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
Co-authored-by: Howard Braham <howrad@gmail.com>

* change js to tsx

* update to typescript

* add labels to circle animation

* add willHide prop to hold to reveal modal

* add test

* convert to design system

* fix lint

* fix type

* bump coverage

* rename

* remove comments

* remove ts comment and add fix exhuastive dep check

* update coverage

* add hide modal test

* use banneralert

* update label

* remove unused

* fix text

* update aria label messages

* change exportAccountAndGetPrivateKey to be async

* fix lint

* update coverage target

* update coverage

* update input component

* update coverage

* update coverage

* fix blank line

* use &&

* move plainKey to under !privateKeyInput

* update hold modal to display srp and private key message

* fix styling

* fix lint and test

* fix unused locales

* remove redundent check

* update storybook

* fix text alignment

* fix lint

* update snapshot

* fix test

* update coverage

* fix merge conflict

* refactor

* fix variant

* update snapshot

* fix test after merge

* fix test after merge conflict

* fix label text

* update to use label component
2023-05-06 17:04:20 -04:00

33 lines
868 B
JavaScript

import React from 'react';
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);
export default {
title: 'Components/App/Modals/ExportPrivateKeyModal',
decorators: [(story) => <Provider store={store}>{story()}</Provider>],
argsTypes: {
exportAccount: { action: 'exportAccount' },
},
};
export const DefaultStory = () => {
return (
<ExportPrivateKeyModal
// mock actions
exportAccount={() => {
return 'mockPrivateKey';
}}
selectedIdentity={
testData.metamask.identities[testData.metamask.selectedAddress]
}
/>
);
};
DefaultStory.storyName = 'Default';