1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/ui/components/app/transaction-detail/transaction-detail.stories.js
Nidhi Kumari 6535e34943
Replaced all fa-icon-circle with INFO icon (#17539)
* replace all fa-icon-circle with INFO icon

* updated classnames

* updated classnames

* updated snapshots

* updated colors

* resolved errors

* fixed relative import

* fixed lint errors

* added story for alerts tab

* update snapshot

* updated info-circle

* updated enum for iconName

* removed classnames

* updated iconName in settings

* fixed lint errors and snapshots
2023-05-09 23:04:58 +05:30

67 lines
1.4 KiB
JavaScript

import React from 'react';
import InfoTooltip from '../../ui/info-tooltip/info-tooltip';
import TransactionDetailItem from '../transaction-detail-item/transaction-detail-item.component';
import GasTiming from '../gas-timing/gas-timing.component';
import { Icon, IconName } from '../../component-library';
import README from './README.mdx';
import TransactionDetail from '.';
export default {
title: 'Components/App/TransactionDetail',
component: TransactionDetail,
parameters: {
docs: {
page: README,
},
},
argTypes: {
rows: { control: 'array' },
onEdit: { action: 'onEdit' },
},
};
const rows = [
<TransactionDetailItem
key="line-1"
detailTitle={
<>
Estimated gas fee
<InfoTooltip contentText="This is the tooltip text" position="top">
<Icon name={IconName.Info} />
</InfoTooltip>
</>
}
detailText="0.00896 ETH"
detailTotal="$15.73"
subTitle={<GasTiming maxPriorityFeePerGas="1" />}
subText={
<>
From <strong>$15.73 - $19.81</strong>
</>
}
/>,
<TransactionDetailItem
key="line-2"
detailTitle="Total"
detailText=".0312 ETH"
detailTotal="$15.77"
subTitle="Amount + gas fee"
subText={
<>
Up to <strong>$19.85</strong>
</>
}
/>,
];
export const DefaultStory = (args) => {
return <TransactionDetail {...args} />;
};
DefaultStory.storyName = 'Default';
DefaultStory.args = {
rows,
};