2021-06-24 01:39:44 +02:00
|
|
|
import React from 'react';
|
|
|
|
import InfoTooltip from '../../ui/info-tooltip/info-tooltip';
|
2021-12-07 17:40:05 +01:00
|
|
|
|
|
|
|
import { COLORS } from '../../../helpers/constants/design-system';
|
|
|
|
|
|
|
|
import README from './README.mdx';
|
2021-06-24 01:39:44 +02:00
|
|
|
import TransactionDetailItem from '.';
|
|
|
|
|
|
|
|
export default {
|
2021-12-01 20:27:57 +01:00
|
|
|
title: 'Components/App/TransactionDetailItem',
|
2021-09-15 20:55:48 +02:00
|
|
|
id: __filename,
|
2021-12-07 17:40:05 +01:00
|
|
|
component: TransactionDetailItem,
|
|
|
|
parameters: {
|
|
|
|
docs: {
|
|
|
|
page: README,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
detailTitle: { control: 'object' },
|
|
|
|
detailTitleColor: {
|
|
|
|
control: {
|
|
|
|
type: 'select',
|
|
|
|
},
|
|
|
|
options: Object.values(COLORS),
|
|
|
|
},
|
|
|
|
detailText: { control: 'text' },
|
|
|
|
detailTotal: { control: 'text' },
|
|
|
|
subTitle: { control: 'object' },
|
|
|
|
subText: { control: 'object' },
|
|
|
|
},
|
2021-06-24 01:39:44 +02:00
|
|
|
};
|
|
|
|
|
2021-12-07 17:40:05 +01:00
|
|
|
export const DefaultStory = (args) => {
|
2021-06-24 01:39:44 +02:00
|
|
|
return (
|
|
|
|
<div style={{ width: '400px' }}>
|
2021-12-07 17:40:05 +01:00
|
|
|
<TransactionDetailItem {...args} />
|
2021-06-24 01:39:44 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
2021-12-01 20:27:57 +01:00
|
|
|
|
|
|
|
DefaultStory.storyName = 'Default';
|
2021-12-07 17:40:05 +01:00
|
|
|
|
|
|
|
DefaultStory.args = {
|
|
|
|
detailTitle: (
|
|
|
|
<>
|
|
|
|
<strong>Estimated gas fee</strong>
|
|
|
|
<InfoTooltip contentText="This is the tooltip text" position="top">
|
|
|
|
<i className="fa fa-info-circle" />
|
|
|
|
</InfoTooltip>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
detailText: '16565.30',
|
|
|
|
detailTotal: '0.0089 ETH',
|
|
|
|
subTitle: 'Likely in < 30 seconds',
|
|
|
|
boldHeadings: true,
|
|
|
|
flexWidthValues: false,
|
|
|
|
subText: (
|
|
|
|
<span>
|
|
|
|
From <strong>$16565 - $19000</strong>
|
|
|
|
</span>
|
|
|
|
),
|
|
|
|
};
|