1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 22:24:27 +01:00
metamask-extension/ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js

36 lines
893 B
JavaScript
Raw Normal View History

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
2018-08-31 21:36:07 +02:00
export default class TransactionBreakdownRow extends PureComponent {
static propTypes = {
title: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
};
2018-08-31 21:36:07 +02:00
2020-11-03 00:41:28 +01:00
render() {
const { title, children, className } = this.props;
2018-08-31 21:36:07 +02:00
return (
<div
className={classnames('transaction-breakdown-row', className)}
data-testid="transaction-breakdown-row"
>
<div
className="transaction-breakdown-row__title"
data-testid="transaction-breakdown-row-title"
>
{title}
</div>
<div
className="transaction-breakdown-row__value"
data-testid="transaction-breakdown-row-value"
>
{children}
</div>
2018-08-31 21:36:07 +02:00
</div>
);
2018-08-31 21:36:07 +02:00
}
}