1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-12 04:37:13 +01:00
metamask-extension/ui/components/app/transaction-detail/transaction-detail.component.js
Dan J Miller 805859af4d Improve flashing behaviour for loading gas estimates (on confirm screen) (#11852)
* Improve flashing behaviour for loading gas estimates

* Fix typo

* renderHeartBeatIfInTest
2021-08-16 18:00:11 -07:00

27 lines
741 B
JavaScript

import React, { useContext } from 'react';
import PropTypes from 'prop-types';
import { I18nContext } from '../../../contexts/i18n';
import TransactionDetailItem from '../transaction-detail-item/transaction-detail-item.component';
export default function TransactionDetail({ rows = [], onEdit }) {
const t = useContext(I18nContext);
return (
<div className="transaction-detail">
{onEdit && (
<div className="transaction-detail-edit">
<button onClick={onEdit}>{t('edit')}</button>
</div>
)}
<div className="transaction-detail-rows">{rows}</div>
</div>
);
}
TransactionDetail.propTypes = {
rows: PropTypes.arrayOf(TransactionDetailItem).isRequired,
onEdit: PropTypes.func,
};