Commit 73580de9 authored by Moody Salem's avatar Moody Salem

improvement(swap): show add a send only for expert mode

parent e32fd3a8
...@@ -7,7 +7,7 @@ import CurrencySearchModal from '../SearchModal/CurrencySearchModal' ...@@ -7,7 +7,7 @@ import CurrencySearchModal from '../SearchModal/CurrencySearchModal'
import CurrencyLogo from '../CurrencyLogo' import CurrencyLogo from '../CurrencyLogo'
import DoubleCurrencyLogo from '../DoubleLogo' import DoubleCurrencyLogo from '../DoubleLogo'
import { RowBetween } from '../Row' import { RowBetween } from '../Row'
import { TYPE, CursorPointer } from '../../theme' import { TYPE } from '../../theme'
import { Input as NumericalInput } from '../NumericalInput' import { Input as NumericalInput } from '../NumericalInput'
import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg' import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg'
...@@ -170,19 +170,17 @@ export default function CurrencyInputPanel({ ...@@ -170,19 +170,17 @@ export default function CurrencyInputPanel({
{label} {label}
</TYPE.body> </TYPE.body>
{account && ( {account && (
<CursorPointer> <TYPE.body
<TYPE.body onClick={onMax}
onClick={onMax} color={theme.text2}
color={theme.text2} fontWeight={500}
fontWeight={500} fontSize={14}
fontSize={14} style={{ display: 'inline', cursor: 'pointer' }}
style={{ display: 'inline' }} >
> {!hideBalance && !!currency && selectedCurrencyBalance
{!hideBalance && !!currency && selectedCurrencyBalance ? 'Balance: ' + selectedCurrencyBalance?.toSignificant(6)
? 'Balance: ' + selectedCurrencyBalance?.toSignificant(6) : ' -'}
: ' -'} </TYPE.body>
</TYPE.body>
</CursorPointer>
)} )}
</RowBetween> </RowBetween>
</LabelRow> </LabelRow>
......
...@@ -41,7 +41,7 @@ import { ...@@ -41,7 +41,7 @@ import {
useUserDeadline, useUserDeadline,
useUserSlippageTolerance useUserSlippageTolerance
} from '../../state/user/hooks' } from '../../state/user/hooks'
import { CursorPointer, LinkStyledButton, TYPE } from '../../theme' import { LinkStyledButton, TYPE } from '../../theme'
import { maxAmountSpend } from '../../utils/maxAmountSpend' import { maxAmountSpend } from '../../utils/maxAmountSpend'
import { computeTradePriceBreakdown, warningSeverity } from '../../utils/prices' import { computeTradePriceBreakdown, warningSeverity } from '../../utils/prices'
import AppBody from '../AppBody' import AppBody from '../AppBody'
...@@ -285,27 +285,25 @@ export default function Swap() { ...@@ -285,27 +285,25 @@ export default function Swap() {
id="swap-currency-input" id="swap-currency-input"
/> />
<CursorPointer> <AutoColumn justify="space-between">
<AutoColumn justify="space-between"> <AutoRow justify="space-between" style={{ padding: '0 1rem' }}>
<AutoRow justify="space-between" style={{ padding: '0 1rem' }}> <ArrowWrapper clickable>
<ArrowWrapper clickable> <ArrowDown
<ArrowDown size="16"
size="16" onClick={() => {
onClick={() => { setApprovalSubmitted(false) // reset 2 step UI for approvals
setApprovalSubmitted(false) // reset 2 step UI for approvals onSwitchTokens()
onSwitchTokens() }}
}} color={currencies[Field.INPUT] && currencies[Field.OUTPUT] ? theme.primary1 : theme.text2}
color={currencies[Field.INPUT] && currencies[Field.OUTPUT] ? theme.primary1 : theme.text2} />
/> </ArrowWrapper>
</ArrowWrapper> {recipient === null && !showWrap && isExpertMode ? (
{recipient === null && !showWrap ? ( <LinkStyledButton id="add-recipient-button" onClick={() => onChangeRecipient('')}>
<LinkStyledButton id="add-recipient-button" onClick={() => onChangeRecipient('')}> + Add a send (optional)
+ Add a send (optional) </LinkStyledButton>
</LinkStyledButton> ) : null}
) : null} </AutoRow>
</AutoRow> </AutoColumn>
</AutoColumn>
</CursorPointer>
<CurrencyInputPanel <CurrencyInputPanel
value={formattedAmounts[Field.OUTPUT]} value={formattedAmounts[Field.OUTPUT]}
onUserInput={handleTypeOutput} onUserInput={handleTypeOutput}
......
...@@ -148,12 +148,6 @@ export const Spinner = styled.img` ...@@ -148,12 +148,6 @@ export const Spinner = styled.img`
height: 16px; height: 16px;
` `
export const CursorPointer = styled.div`
:hover {
cursor: pointer;
}
`
const BackArrowLink = styled(StyledInternalLink)` const BackArrowLink = styled(StyledInternalLink)`
color: ${({ theme }) => theme.text1}; color: ${({ theme }) => theme.text1};
` `
......
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