mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 06:07:06 +01:00
fcfb8a8938
* added redesign storybook * updated token list * updated css * fixed lint error * updated the new token list component * fixed redesign folder error * reverted changes in settings.json * updated redesign to multichain * added feature flag * reverted settings.json * added detect token banner * added button componeny * fixed lint errors * removed settings * fixed lint errors * added stories for multichain * updated no token found string * updated lint error * updated padding values * updated padding values * updated tabs with role button * updated hover state * updated components with multichain * fixed lint errors * updated multichain import token link * updated a tag * updated fixes * updated onClick to handleClick * updated setShowDetectedTokens proptype * updated multichain tokenlist with item suffix * updated tests * updated tests * updated token list css * updated snapshot * updated text * reverted story * added story for multichain token list * updated story * updated tooltip * updated the new token list component * fixed redesign folder error * added feature flag * reverted unused setting change * removed token list * fixed lint error * updated status * updated tooltip * updated token-list-item changes * updated actionbutton click for detect token banner * updated snapshot * updated symbol * updated styles * updated eth decimal and token url * updated snapshot * updated scripts * updated snapshots
79 lines
1.6 KiB
JavaScript
79 lines
1.6 KiB
JavaScript
import React from 'react';
|
|
import { Provider } from 'react-redux';
|
|
import testData from '../../../../.storybook/test-data';
|
|
import configureStore from '../../../store/store';
|
|
import { MultichainTokenListItem } from './multichain-token-list-item';
|
|
|
|
export default {
|
|
title: 'Components/Multichain/MultichainTokenListItem',
|
|
component: MultichainTokenListItem,
|
|
argTypes: {
|
|
tokenSymbol: {
|
|
control: 'text',
|
|
},
|
|
tokenImage: {
|
|
control: 'text',
|
|
},
|
|
primary: {
|
|
control: 'text',
|
|
},
|
|
secondary: {
|
|
control: 'text',
|
|
},
|
|
title: {
|
|
control: 'text',
|
|
},
|
|
onClick: {
|
|
action: 'onClick',
|
|
},
|
|
},
|
|
args: {
|
|
secondary: '$9.80 USD',
|
|
primary: '88.00687889',
|
|
tokenImage: './images/eth_logo.svg',
|
|
tokenSymbol: 'ETH',
|
|
title: 'Ethereum',
|
|
},
|
|
};
|
|
|
|
const customNetworkData = {
|
|
...testData,
|
|
metamask: { ...testData.metamask, nativeCurrency: '' },
|
|
};
|
|
const customNetworkStore = configureStore(customNetworkData);
|
|
|
|
const Template = (args) => {
|
|
return <MultichainTokenListItem {...args} />;
|
|
};
|
|
|
|
export const DefaultStory = Template.bind({});
|
|
|
|
export const ChaosStory = (args) => (
|
|
<div
|
|
style={{ width: '336px', border: '1px solid var(--color-border-muted)' }}
|
|
>
|
|
<MultichainTokenListItem {...args} />
|
|
</div>
|
|
);
|
|
ChaosStory.storyName = 'ChaosStory';
|
|
|
|
ChaosStory.args = {
|
|
title: 'Really long, long name',
|
|
secondary: '$94556756776.80 USD',
|
|
primary: '34449765768526.00',
|
|
};
|
|
|
|
export const NoImagesStory = Template.bind({});
|
|
|
|
NoImagesStory.decorators = [
|
|
(Story) => (
|
|
<Provider store={customNetworkStore}>
|
|
<Story />
|
|
</Provider>
|
|
),
|
|
];
|
|
|
|
NoImagesStory.args = {
|
|
tokenImage: '',
|
|
};
|