1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/ui/components/app/signature-request-siwe/signature-request-siwe-header/signature-request-siwe-header.stories.js

49 lines
1.2 KiB
JavaScript
Raw Normal View History

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',
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,
};