import React from 'react' import PropTypes from 'prop-types' import InfoTooltip from '../../../components/ui/info-tooltip' export default function FeeCard ({ feeRowText, primaryFee, secondaryFee, thirdRow, maxFeeRow, }) { return (
{feeRowText}
{primaryFee.fee}
{secondaryFee && (
{secondaryFee.fee}
)}
maxFeeRow.onClick()}>
{maxFeeRow.text}
{maxFeeRow.linkText}
{primaryFee.maxFee}
{secondaryFee?.maxFee !== undefined && (
{secondaryFee.maxFee}
)}
{thirdRow && !thirdRow.hide && (
{thirdRow.text}
thirdRow.onClick()}> {thirdRow.linkText}
)}
) } FeeCard.propTypes = { feeRowText: PropTypes.string.isRequired, primaryFee: PropTypes.shape({ fee: PropTypes.string.isRequired, maxFee: PropTypes.string.isRequired, }).isRequired, secondaryFee: PropTypes.shape({ fee: PropTypes.string.isRequired, maxFee: PropTypes.string.isRequired, }), maxFeeRow: PropTypes.shape({ text: PropTypes.string.isRequired, linkText: PropTypes.string.isRequired, tooltipText: PropTypes.string.isRequired, onClick: PropTypes.func.isRequired, }).isRequired, thirdRow: PropTypes.shape({ text: PropTypes.oneOfType([ PropTypes.string, PropTypes.node, ]).isRequired, linkText: PropTypes.string.isRequired, tooltipText: PropTypes.oneOfType([ PropTypes.string, PropTypes.node, ]).isRequired, onClick: PropTypes.func.isRequired, hide: PropTypes.bool.isRequired, }), }