improvement(swap): hide swap placeholders to reduce visual complexity (#1678)

* resolve #1646: hide swap placeholders to reduce visual complexity

* use empty string over space
This commit is contained in:
Justin Domingue 2021-05-21 10:44:41 -07:00 committed by GitHub
parent da14d8fd5b
commit 858b6afb2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

@ -24,8 +24,8 @@ export function FiatValue({
return (
<TYPE.body fontSize={14} color={fiatValue ? theme.text2 : theme.text4}>
{fiatValue ? '~' : ''}$
<HoverInlineText text={fiatValue ? fiatValue?.toSignificant(6, { groupSeparator: ',' }) : '-'} />{' '}
{fiatValue ? '~$' : ''}
<HoverInlineText text={fiatValue ? fiatValue?.toSignificant(6, { groupSeparator: ',' }) : ''} />{' '}
{priceImpact ? (
<span style={{ color: priceImpactColor }}> ({priceImpact.multiply(-1).toSignificant(3)}%)</span>
) : null}

@ -273,14 +273,14 @@ export default function CurrencyInputPanel({
formatTokenAmount(selectedCurrencyBalance, 4) +
' ' +
currency.symbol
: '-'}
: ''}
</TYPE.body>
{showMaxButton && selectedCurrencyBalance ? (
<StyledBalanceMax onClick={onMax}>(Max)</StyledBalanceMax>
) : null}
</RowFixed>
) : (
'-'
<span></span>
)}
<FiatValue fiatValue={fiatValue} priceImpact={priceImpact} />
</RowBetween>