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' ...@@ -3,6 +3,7 @@ import React, { useMemo } from 'react'
import useTheme from '../../hooks/useTheme' import useTheme from '../../hooks/useTheme'
import { TYPE } from '../../theme' import { TYPE } from '../../theme'
import { warningSeverity } from '../../utils/prices' import { warningSeverity } from '../../utils/prices'
import HoverInlineText from 'components/HoverInlineText'
export function FiatValue({ export function FiatValue({
fiatValue, fiatValue,
...@@ -23,7 +24,8 @@ export function FiatValue({ ...@@ -23,7 +24,8 @@ export function FiatValue({
return ( return (
<TYPE.body fontSize={14} color={fiatValue ? theme.text2 : theme.text4}> <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 ? ( {priceImpact ? (
<span style={{ color: priceImpactColor }}> ({priceImpact.multiply(-100).toSignificant(3)}%)</span> <span style={{ color: priceImpactColor }}> ({priceImpact.multiply(-100).toSignificant(3)}%)</span>
) : null} ) : null}
......
...@@ -2,7 +2,7 @@ import Tooltip from 'components/Tooltip' ...@@ -2,7 +2,7 @@ import Tooltip from 'components/Tooltip'
import React, { useState } from 'react' import React, { useState } from 'react'
import styled from 'styled-components' 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; position: relative;
margin-left: ${({ margin }) => margin && '4px'}; margin-left: ${({ margin }) => margin && '4px'};
color: ${({ theme, link }) => (link ? theme.blue1 : theme.text1)}; color: ${({ theme, link }) => (link ? theme.blue1 : theme.text1)};
......
...@@ -15,6 +15,7 @@ import { unwrappedToken } from 'utils/wrappedCurrency' ...@@ -15,6 +15,7 @@ import { unwrappedToken } from 'utils/wrappedCurrency'
import { DAI, USDC, USDT, WBTC } from '../../constants' import { DAI, USDC, USDT, WBTC } from '../../constants'
import RangeBadge from 'components/Badge/RangeBadge' import RangeBadge from 'components/Badge/RangeBadge'
import { RowFixed } from 'components/Row' import { RowFixed } from 'components/Row'
import HoverInlineText from 'components/HoverInlineText'
const Row = styled(Link)` const Row = styled(Link)`
align-items: center; align-items: center;
...@@ -244,8 +245,10 @@ export default function PositionListItem({ positionDetails }: PositionListItemPr ...@@ -244,8 +245,10 @@ export default function PositionListItem({ positionDetails }: PositionListItemPr
> >
<RangeText> <RangeText>
<ExtentsText>Min: </ExtentsText> <ExtentsText>Min: </ExtentsText>
{formatPrice(priceLower, 5)} {manuallyInverted ? currencyQuote?.symbol : currencyBase?.symbol} {' per '}{' '} {formatPrice(priceLower, 5)}{' '}
{manuallyInverted ? currencyBase?.symbol : currencyQuote?.symbol} <HoverInlineText text={manuallyInverted ? currencyQuote?.symbol ?? '' : currencyBase?.symbol ?? ''} />{' '}
{' per '}{' '}
<HoverInlineText text={manuallyInverted ? currencyBase?.symbol ?? '' : currencyQuote?.symbol ?? ''} />
</RangeText>{' '} </RangeText>{' '}
<HideSmall> <HideSmall>
<DoubleArrow></DoubleArrow>{' '} <DoubleArrow></DoubleArrow>{' '}
...@@ -255,8 +258,13 @@ export default function PositionListItem({ positionDetails }: PositionListItemPr ...@@ -255,8 +258,13 @@ export default function PositionListItem({ positionDetails }: PositionListItemPr
</SmallOnly> </SmallOnly>
<RangeText> <RangeText>
<ExtentsText>Max:</ExtentsText> <ExtentsText>Max:</ExtentsText>
{formatPrice(priceUpper, 5)} {manuallyInverted ? currencyQuote?.symbol : currencyBase?.symbol} {' per '}{' '} {formatPrice(priceUpper, 5)}{' '}
{manuallyInverted ? currencyBase?.symbol : currencyQuote?.symbol} <HoverInlineText text={manuallyInverted ? currencyQuote?.symbol ?? '' : currencyBase?.symbol ?? ''} />{' '}
{' per '}{' '}
<HoverInlineText
maxCharacters={10}
text={manuallyInverted ? currencyBase?.symbol ?? '' : currencyQuote?.symbol ?? ''}
/>
</RangeText>{' '} </RangeText>{' '}
</RangeLineItem> </RangeLineItem>
</> </>
......
...@@ -5,8 +5,8 @@ import Popover, { PopoverProps } from '../Popover' ...@@ -5,8 +5,8 @@ import Popover, { PopoverProps } from '../Popover'
const TooltipContainer = styled.div` const TooltipContainer = styled.div`
width: 256px; width: 256px;
padding: 0.6rem 1rem; padding: 0.6rem 1rem;
/* line-height: 150%; */
font-weight: 400; font-weight: 400;
word-break: break-word;
` `
interface TooltipProps extends Omit<PopoverProps, 'content'> { interface TooltipProps extends Omit<PopoverProps, 'content'> {
......
...@@ -109,6 +109,7 @@ const ResponsiveColumn = styled(AutoColumn)` ...@@ -109,6 +109,7 @@ const ResponsiveColumn = styled(AutoColumn)`
` `
const StyledImage = styled.img` const StyledImage = styled.img`
height: 114px;
margin-top: -28px; margin-top: -28px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.mediaWidth.upToMedium`
height: 80px; 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