mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-04 23:14:56 +01:00
429451de23
The form used for creating a vault on the "Import" page of onboarding and on the "Restore vault" page is nearly identical, yet the implementation is totally separate. It has now been extracted to a separate component, consolidating the two implementations. There is a "terms of use" checkbox on the import page that isn't on the restore vault page, so that part has been made optional. The "submit" button text differs between the two uses as well, so that is customizable. There are slight styling differences between the old and new versions of this form. The fonts and spacing are all using our new standard design system guidelines, and we're using our standard checkbox now as well. The spacing and font sizes were chosen somewhat arbitrarily by me to resemble the old styles, so please feel free to suggest changes if you think they can be improved upon. There are some slight copy changes to the "Restore vault" page as well; the placeholder text and the label for the "Secret Recovery Phrase" field now matches the "Import" page copy.
30 lines
578 B
JavaScript
30 lines
578 B
JavaScript
import React from 'react';
|
|
import CreateNewVault from '.';
|
|
|
|
export default {
|
|
title: 'Components/App/CreateNewVault',
|
|
id: __filename,
|
|
argTypes: {
|
|
disabled: { control: 'boolean' },
|
|
submitText: { control: 'text' },
|
|
},
|
|
args: {
|
|
submitText: 'Import',
|
|
},
|
|
};
|
|
|
|
const Template = (args) => {
|
|
return (
|
|
<div style={{ width: '600px' }}>
|
|
<CreateNewVault {...args} />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export const DefaultStory = Template.bind({});
|
|
|
|
DefaultStory.storyName = 'Default';
|
|
|
|
export const WithTerms = Template.bind({});
|
|
WithTerms.args = { includeTerms: true };
|