import React from 'react'; import PropTypes from 'prop-types'; import Typography from '../../ui/typography/typography'; import { COLORS, FONT_WEIGHT, TYPOGRAPHY, } from '../../../helpers/constants/design-system'; export default function TransactionDetailItem({ detailTitle, detailText, detailTotal, subTitle, subText, }) { return (
{detailTitle} {detailText && ( {detailText} )} {detailTotal}
{subTitle && ( {subTitle} )} {subText}
); } TransactionDetailItem.propTypes = { detailTitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), detailText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), detailTotal: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), subTitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), subText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), }; TransactionDetailItem.defaultProps = { detailTitle: '', detailText: '', detailTotal: '', subTitle: '', subText: '', };