import classNames from 'classnames' import { HTMLAttributes } from 'react' import { FormattedNumber } from 'components/FormattedNumber' import { InfoCircle } from 'components/Icons' import Text from 'components/Text' import { BNCoin } from 'types/classes/BNCoin' import { getAssetByDenom } from 'utils/assets' interface Props extends HTMLAttributes { action: 'buy' | 'deposit' | 'fund' coins: BNCoin[] showIcon?: boolean } export default function DepositCapMessage(props: Props) { if (!props.coins.length) return null return (
{props.showIcon && }
Deposit Cap Reached! {`Unfortunately you're not able to ${ props.action } more than the following amount${props.coins.length > 1 ? 's' : ''}:`} {props.coins.map((coin) => { const asset = getAssetByDenom(coin.denom) if (!asset) return null return (
Cap Left:
) })}
) }