1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/ui/components/app/signature-request-siwe/signature-request-siwe-header/signature-request-siwe-header.stories.js
Sam Gbafa 512b9bdf76
Sign-in With Ethereum Design Update (#16019)
* header warning changes

* updated warning message

* Updated button color

* add rounded corners

* text + style changes

* cleanup

* linter fixes

* remove console.log

* break out components

* remove unused css

* use icon name var

* improve icon styling

* remove unused styles

* Update ui/components/app/signature-request-siwe/signature-request-siwe-tag/index.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* Update ui/components/app/signature-request-siwe/signature-request-siwe-tag/index.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

* use design system fonts

* remove unused fonts

* moved tooltip to parent component

* remove domain call

* updated stories

* classname cleanup

* fix locales

* remove unused locales

* Update ui/components/app/signature-request-siwe/signature-request-siwe-tag/index.js

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>

Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
2022-10-04 18:33:51 -03:00

49 lines
1.2 KiB
JavaScript

import React from 'react';
import testData from '../../../../../.storybook/test-data';
import SignatureRequestSIWEHeader from '.';
const primaryIdentity = Object.values(testData.metamask.identities)[0];
const subjectMetadata = {
iconUrl: '/images/logo/metamask-fox.svg',
name: 'MetaMask',
origin: 'http://localhost:8080',
};
export default {
title: 'Components/App/SignatureRequestSIWE/SignatureRequestSIWEHeader',
id: __filename,
argTypes: {
fromAccount: {
table: {
address: { control: 'text' },
balance: { control: 'text' },
name: { control: 'text' },
},
},
domain: { control: 'text' },
subjectMetadata: { control: 'object' },
},
};
export const DefaultStory = (args) => <SignatureRequestSIWEHeader {...args} />;
DefaultStory.storyName = 'Default';
DefaultStory.args = {
fromAccount: primaryIdentity,
domain: window.location.host,
isSIWEDomainValid: true,
subjectMetadata,
};
export const ErrorStory = (args) => <SignatureRequestSIWEHeader {...args} />;
ErrorStory.storyName = 'Error';
ErrorStory.args = {
fromAccount: primaryIdentity,
domain: window.location.host,
isSIWEDomainValid: false,
subjectMetadata,
};