2021-02-04 19:15:23 +01:00
|
|
|
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,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2018-08-31 21:36:07 +02:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
render() {
|
2021-02-04 19:15:23 +01:00
|
|
|
const { title, children, className } = this.props;
|
2018-08-31 21:36:07 +02:00
|
|
|
|
|
|
|
return (
|
2021-09-08 20:06:16 +02:00
|
|
|
<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>
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
2018-08-31 21:36:07 +02:00
|
|
|
}
|
|
|
|
}
|