Skip to content

Commit

Permalink
fix(sell): styling of coin selection
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed Nov 27, 2020
1 parent ab1c060 commit 6c83d97
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const CryptoSelector: React.FC<InjectedFormProps<{}, Props> &
account={account}
coins={props.coins}
isAccountSelected={false}
isSwap={false}
onClick={() => handleSell(account)}
walletCurrency={props.walletCurrency}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { SwapAccountType } from 'data/types'
import CoinBalance from '../../components/CoinBalance'

const CryptoAccountOption: React.FC<Props> = props => {
const { account, coins, isAccountSelected, walletCurrency } = props
const { account, coins, isAccountSelected, isSwap, walletCurrency } = props
return (
<Option role='button' data-e2e='changeAcct' onClick={props.onClick}>
<FlexStartRow>
Expand All @@ -38,15 +38,19 @@ const CryptoAccountOption: React.FC<Props> = props => {
{account.type === 'CUSTODIAL' && (
<SuccessCartridge>Low Fees</SuccessCartridge>
)}
{isAccountSelected ? (
<Icon
name='checkmark-circle-filled'
color='green600'
size='24px'
style={{ padding: '0 2px', marginLeft: '24px' }}
/>
{isSwap ? (
isAccountSelected ? (
<Icon
name='checkmark-circle-filled'
color='green600'
size='24px'
style={{ padding: '0 2px', marginLeft: '24px' }}
/>
) : (
<CircleBorder />
)
) : (
<CircleBorder />
<Icon name='chevron-right' size='32px' color='grey400' />
)}
</FlexStartRow>
</Option>
Expand All @@ -57,6 +61,7 @@ type Props = {
account: SwapAccountType
coins: SupportedWalletCurrenciesType
isAccountSelected: boolean
isSwap: boolean
onClick: () => void
walletCurrency: FiatType
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class CoinSelection extends PureComponent<Props> {
account={account}
coins={coins}
isAccountSelected={isAccountSelected}
isSwap={true}
walletCurrency={walletCurrency}
onClick={() =>
this.props.swapActions.changePair(this.props.side, account)
Expand Down

0 comments on commit 6c83d97

Please sign in to comment.