1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00
metamask-extension/ui/pages/send/send-content/add-recipient/add-recipient.stories.js
George Marshall 854fc71ae7
Organizing storybook to echo app folder structure (#12796)
* Organizing storybook to echo app folder structure

* Updating new stories to follow new convention from develop
2021-12-01 11:27:57 -08:00

40 lines
1.1 KiB
JavaScript

import React from 'react';
import { Provider } from 'react-redux';
import { text } from '@storybook/addon-knobs';
import configureStore from '../../../../store/store';
import testData from '../../../../../.storybook/test-data';
import AddRecipient from './add-recipient.component';
const store = configureStore(testData);
export default {
title: 'Pages/Send/SendContent/AddRecipient',
id: __filename,
decorators: [(story) => <Provider store={store}>{story()}</Provider>],
};
export const DefaultStory = () => {
const { metamask } = store.getState();
const { addressBook, recipient } = metamask;
return (
<div style={{ width: 300 }}>
<AddRecipient
contacts={[addressBook]}
recipient={recipient}
updateRecipient={() => undefined}
nonContacts={[addressBook]}
ownedAccounts={[addressBook]}
addressBook={[addressBook]}
updateGas={() => undefined}
// ToError and ToWarning wording must match on translation
ensError={text('To Error', 'loading')}
ensWarning={text('To Warning', 'loading')}
/>
</div>
);
};
DefaultStory.storyName = 'Default';