Commit 37a4e2f6 authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

More UI bug fixes (#1515)

* fix for error token map parsings

* update varios UI styles

* update padding on & amounts
parent 19a3b12c
......@@ -3,6 +3,7 @@ import React, { useMemo } from 'react'
import useTheme from '../../hooks/useTheme'
import { TYPE } from '../../theme'
import { warningSeverity } from '../../utils/prices'
import HoverInlineText from 'components/HoverInlineText'
export function FiatValue({
fiatValue,
......@@ -23,7 +24,8 @@ export function FiatValue({
return (
<TYPE.body fontSize={14} color={fiatValue ? theme.text2 : theme.text4}>
{fiatValue ? '~' : ''}${fiatValue ? Number(fiatValue?.toSignificant(6)).toLocaleString('en') : '-'}
{fiatValue ? '~' : ''}$
<HoverInlineText text={fiatValue ? Number(fiatValue?.toSignificant(6)).toLocaleString('en') : '-'} />{' '}
{priceImpact ? (
<span style={{ color: priceImpactColor }}> ({priceImpact.multiply(-100).toSignificant(3)}%)</span>
) : null}
......
......@@ -2,7 +2,7 @@ import Tooltip from 'components/Tooltip'
import React, { useState } from 'react'
import styled from 'styled-components'
const TextWrapper = styled.div<{ margin: boolean; link: boolean; fontSize?: string; adjustSize?: boolean }>`
const TextWrapper = styled.span<{ margin: boolean; link: boolean; fontSize?: string; adjustSize?: boolean }>`
position: relative;
margin-left: ${({ margin }) => margin && '4px'};
color: ${({ theme, link }) => (link ? theme.blue1 : theme.text1)};
......
......@@ -15,6 +15,7 @@ import { unwrappedToken } from 'utils/wrappedCurrency'
import { DAI, USDC, USDT, WBTC } from '../../constants'
import RangeBadge from 'components/Badge/RangeBadge'
import { RowFixed } from 'components/Row'
import HoverInlineText from 'components/HoverInlineText'
const Row = styled(Link)`
align-items: center;
......@@ -244,8 +245,10 @@ export default function PositionListItem({ positionDetails }: PositionListItemPr
>
<RangeText>
<ExtentsText>Min: </ExtentsText>
{formatPrice(priceLower, 5)} {manuallyInverted ? currencyQuote?.symbol : currencyBase?.symbol} {' per '}{' '}
{manuallyInverted ? currencyBase?.symbol : currencyQuote?.symbol}
{formatPrice(priceLower, 5)}{' '}
<HoverInlineText text={manuallyInverted ? currencyQuote?.symbol ?? '' : currencyBase?.symbol ?? ''} />{' '}
{' per '}{' '}
<HoverInlineText text={manuallyInverted ? currencyBase?.symbol ?? '' : currencyQuote?.symbol ?? ''} />
</RangeText>{' '}
<HideSmall>
<DoubleArrow></DoubleArrow>{' '}
......@@ -255,8 +258,13 @@ export default function PositionListItem({ positionDetails }: PositionListItemPr
</SmallOnly>
<RangeText>
<ExtentsText>Max:</ExtentsText>
{formatPrice(priceUpper, 5)} {manuallyInverted ? currencyQuote?.symbol : currencyBase?.symbol} {' per '}{' '}
{manuallyInverted ? currencyBase?.symbol : currencyQuote?.symbol}
{formatPrice(priceUpper, 5)}{' '}
<HoverInlineText text={manuallyInverted ? currencyQuote?.symbol ?? '' : currencyBase?.symbol ?? ''} />{' '}
{' per '}{' '}
<HoverInlineText
maxCharacters={10}
text={manuallyInverted ? currencyBase?.symbol ?? '' : currencyQuote?.symbol ?? ''}
/>
</RangeText>{' '}
</RangeLineItem>
</>
......
......@@ -5,8 +5,8 @@ import Popover, { PopoverProps } from '../Popover'
const TooltipContainer = styled.div`
width: 256px;
padding: 0.6rem 1rem;
/* line-height: 150%; */
font-weight: 400;
word-break: break-word;
`
interface TooltipProps extends Omit<PopoverProps, 'content'> {
......
......@@ -109,6 +109,7 @@ const ResponsiveColumn = styled(AutoColumn)`
`
const StyledImage = styled.img`
height: 114px;
margin-top: -28px;
${({ theme }) => theme.mediaWidth.upToMedium`
height: 80px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment