mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +01:00
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Typography from '../../ui/typography/typography';
|
|
import { COLORS, TYPOGRAPHY } from '../../../helpers/constants/design-system';
|
|
|
|
import GasTiming from '../gas-timing/gas-timing.component';
|
|
|
|
export default function TransactionTotalBanner({ total, detail, timing }) {
|
|
return (
|
|
<div className="transaction-total-banner">
|
|
<Typography color={COLORS.BLACK} variant={TYPOGRAPHY.H1}>
|
|
{total}
|
|
</Typography>
|
|
{detail && (
|
|
<Typography
|
|
color={COLORS.BLACK}
|
|
variant={TYPOGRAPHY.H6}
|
|
className="transaction-total-banner__detail"
|
|
>
|
|
{detail}
|
|
</Typography>
|
|
)}
|
|
{timing && <GasTiming text={timing} />}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
TransactionTotalBanner.propTypes = {
|
|
total: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
detail: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
timing: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
};
|
|
|
|
TransactionTotalBanner.defaultProps = {
|
|
total: '',
|
|
detail: '',
|
|
timing: '',
|
|
};
|