2023-03-23 11:08:33 +01:00
|
|
|
import React from 'react';
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import testData from '../../../../.storybook/test-data';
|
|
|
|
import configureStore from '../../../store/store';
|
2023-06-28 15:37:03 +02:00
|
|
|
import { TokenListItem } from '.';
|
2023-03-23 11:08:33 +01:00
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Components/Multichain/MultichainTokenListItem',
|
2023-06-14 17:51:19 +02:00
|
|
|
component: TokenListItem,
|
2023-03-23 11:08:33 +01:00
|
|
|
argTypes: {
|
|
|
|
tokenSymbol: {
|
|
|
|
control: 'text',
|
|
|
|
},
|
|
|
|
tokenImage: {
|
|
|
|
control: 'text',
|
|
|
|
},
|
|
|
|
primary: {
|
|
|
|
control: 'text',
|
|
|
|
},
|
|
|
|
secondary: {
|
|
|
|
control: 'text',
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
control: 'text',
|
|
|
|
},
|
|
|
|
onClick: {
|
|
|
|
action: 'onClick',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
args: {
|
|
|
|
secondary: '$9.80 USD',
|
2023-05-03 18:51:12 +02:00
|
|
|
primary: '88.0068',
|
2023-04-19 17:25:19 +02:00
|
|
|
tokenImage: './images/eth_logo.png',
|
2023-03-23 11:08:33 +01:00
|
|
|
tokenSymbol: 'ETH',
|
|
|
|
title: 'Ethereum',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const customNetworkData = {
|
|
|
|
...testData,
|
2023-07-12 19:27:39 +02:00
|
|
|
metamask: {
|
|
|
|
...testData.metamask,
|
|
|
|
providerConfig: {
|
|
|
|
chainId: '0x1',
|
|
|
|
},
|
|
|
|
},
|
2023-03-23 11:08:33 +01:00
|
|
|
};
|
|
|
|
const customNetworkStore = configureStore(customNetworkData);
|
|
|
|
|
|
|
|
const Template = (args) => {
|
2023-06-14 17:51:19 +02:00
|
|
|
return <TokenListItem {...args} />;
|
2023-03-23 11:08:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export const DefaultStory = Template.bind({});
|
2023-07-12 19:27:39 +02:00
|
|
|
DefaultStory.decorators = [
|
|
|
|
(Story) => (
|
|
|
|
<Provider store={customNetworkStore}>
|
|
|
|
<Story />
|
|
|
|
</Provider>
|
|
|
|
),
|
|
|
|
];
|
2023-03-23 11:08:33 +01:00
|
|
|
|
|
|
|
export const ChaosStory = (args) => (
|
|
|
|
<div
|
|
|
|
style={{ width: '336px', border: '1px solid var(--color-border-muted)' }}
|
|
|
|
>
|
2023-06-14 17:51:19 +02:00
|
|
|
<TokenListItem {...args} />
|
2023-03-23 11:08:33 +01:00
|
|
|
</div>
|
|
|
|
);
|
2023-07-12 19:27:39 +02:00
|
|
|
ChaosStory.decorators = [
|
|
|
|
(Story) => (
|
|
|
|
<Provider store={customNetworkStore}>
|
|
|
|
<Story />
|
|
|
|
</Provider>
|
|
|
|
),
|
|
|
|
];
|
2023-03-23 11:08:33 +01:00
|
|
|
|
|
|
|
ChaosStory.args = {
|
|
|
|
title: 'Really long, long name',
|
|
|
|
secondary: '$94556756776.80 USD',
|
|
|
|
primary: '34449765768526.00',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const NoImagesStory = Template.bind({});
|
|
|
|
|
|
|
|
NoImagesStory.args = {
|
|
|
|
tokenImage: '',
|
|
|
|
};
|