Commit 95097378 authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

Improvement(add): Style tweaks on add page, remove timeout (#30)

* start add liquidity

* update add state, add input UI

* basic add skeleton with dummy state

* refactor with preview steps on add

* small style tweaks, timeout update

* remove merge conflict
parent e42a26c3
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
"toleranceExplanation": "Lowering this limit decreases your risk of frontrunning. However, this makes more likely that your transaction will fail due to normal price movements.", "toleranceExplanation": "Lowering this limit decreases your risk of frontrunning. However, this makes more likely that your transaction will fail due to normal price movements.",
"tokenSearchPlaceholder": "Search name or paste address", "tokenSearchPlaceholder": "Search name or paste address",
"selectFee": "Select Fee", "selectFee": "Select Fee",
"selectLiquidityRange": "Select liquidity range", "selectLiquidityRange": "Select Liquidity Range",
"selectPool": "Select Fee Pool", "selectPool": "Select Fee Tier",
"inputTokens": "Input Tokens", "inputTokens": "Input Tokens",
"fee": "fee", "fee": "fee",
"setLimits": "Set Limits", "setLimits": "Set Limits",
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
"addEarnHelper": "You will earn fees from trades proportional to your share of the pool.", "addEarnHelper": "You will earn fees from trades proportional to your share of the pool.",
"learnMoreAboutFess": " Learn more about earning fees.", "learnMoreAboutFess": " Learn more about earning fees.",
"selectAPool": "Select a pool to provide liquidity to.", "selectAPool": "Select a pool to provide liquidity to.",
"poolType": "Select a pool type based on your preferred liquidity provider fee.", "poolType": "Select a fee tier based on your preferred liquidity provider fee.",
"rangeWarning": "Your liquidity will only be active and earning fees when the rate of the pool is within this price range.", "rangeWarning": "Your liquidity will only be active and earning fees when the rate of the pool is within this price range.",
"chooseLiquidityAmount": "Choose an amount of tokens to open this liquidity position. If you don’t have enough tokens you can trade for them with a Swap.", "chooseLiquidityAmount": "Choose an amount of tokens to open this liquidity position. If you don’t have enough tokens you can trade for them with a Swap.",
"selectPriceLimits": "Select Price Limits", "selectPriceLimits": "Select Price Limits",
......
...@@ -5,6 +5,7 @@ import { darken, lighten } from 'polished' ...@@ -5,6 +5,7 @@ import { darken, lighten } from 'polished'
import { RowBetween } from '../Row' import { RowBetween } from '../Row'
import { ChevronDown, Check } from 'react-feather' import { ChevronDown, Check } from 'react-feather'
import { Button as RebassButton, ButtonProps } from 'rebass/styled-components' import { Button as RebassButton, ButtonProps } from 'rebass/styled-components'
import useTheme from 'hooks/useTheme'
const Base = styled(RebassButton)<{ const Base = styled(RebassButton)<{
padding?: string padding?: string
...@@ -379,6 +380,8 @@ const CheckboxWrapper = styled.div` ...@@ -379,6 +380,8 @@ const CheckboxWrapper = styled.div`
` `
export function ButtonRadioChecked({ active = false, children, ...rest }: { active?: boolean } & ButtonProps) { export function ButtonRadioChecked({ active = false, children, ...rest }: { active?: boolean } & ButtonProps) {
const theme = useTheme()
if (!active) { if (!active) {
return ( return (
<ButtonOutlined borderRadius="12px" padding="12px 8px" {...rest}> <ButtonOutlined borderRadius="12px" padding="12px 8px" {...rest}>
...@@ -393,7 +396,7 @@ export function ButtonRadioChecked({ active = false, children, ...rest }: { acti ...@@ -393,7 +396,7 @@ export function ButtonRadioChecked({ active = false, children, ...rest }: { acti
{children} {children}
<CheckboxWrapper> <CheckboxWrapper>
<Circle> <Circle>
<Check size={13} /> <Check size={13} stroke={theme.white} />
</Circle> </Circle>
</CheckboxWrapper> </CheckboxWrapper>
</RowBetween> </RowBetween>
......
...@@ -81,7 +81,7 @@ const StepCounter = ({ value, onUserInput, usePercent = false, prependSymbol }: ...@@ -81,7 +81,7 @@ const StepCounter = ({ value, onUserInput, usePercent = false, prependSymbol }:
setTimeout(function () { setTimeout(function () {
setPulsing(false) setPulsing(false)
}, 1800) }, 1800)
}, 400) }, 0)
} }
}, [localValue, useLocalValue, value]) }, [localValue, useLocalValue, value])
......
...@@ -413,7 +413,7 @@ export default function AddLiquidity({ ...@@ -413,7 +413,7 @@ export default function AddLiquidity({
{t('rangeWarning')} {t('rangeWarning')}
</TYPE.main> </TYPE.main>
{price && rateCurrencyBase && ( {price && rateCurrencyBase && (
<RowBetween style={{ backgroundColor: '#1A2028', padding: '8px' }}> <RowBetween style={{ backgroundColor: theme.bg3, padding: '8px', borderRadius: '12px' }}>
<TYPE.main>{t('currentRate', { label: rateCurrencyBase.symbol })}</TYPE.main> <TYPE.main>{t('currentRate', { label: rateCurrencyBase.symbol })}</TYPE.main>
<TYPE.main> <TYPE.main>
{rateCurrencyBase === currencyA ? price.toSignificant(3) : price.invert().toSignificant(3)}{' '} {rateCurrencyBase === currencyA ? price.toSignificant(3) : price.invert().toSignificant(3)}{' '}
......
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