Make swap arrows accessible, make swaps advanced options accessible (#9750)

feature/default_network_editable
David Walsh 4 years ago committed by GitHub
parent 59aab93560
commit 77dc0ab008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/_locales/en/messages.json
  2. 5
      ui/app/pages/swaps/build-quote/build-quote.js
  3. 5
      ui/app/pages/swaps/build-quote/index.scss
  4. 1
      ui/app/pages/swaps/slippage-buttons/index.scss
  5. 4
      ui/app/pages/swaps/slippage-buttons/slippage-buttons.js

@ -1827,6 +1827,9 @@
"swapSwapFrom": { "swapSwapFrom": {
"message": "Swap from" "message": "Swap from"
}, },
"swapSwapSwitch": {
"message": "Switch from and to tokens"
},
"swapSwapTo": { "swapSwapTo": {
"message": "Swap to" "message": "Swap to"
}, },

@ -230,13 +230,14 @@ export default function BuildQuote ({
<div <div
className="build-quote__swap-arrows-row" className="build-quote__swap-arrows-row"
> >
<div <button
className="build-quote__swap-arrows" className="build-quote__swap-arrows"
onClick={() => { onClick={() => {
onToSelect(selectedFromToken) onToSelect(selectedFromToken)
onFromSelect(selectedToToken) onFromSelect(selectedToToken)
}} }}
/> ><img src="/images/icons/swap2.svg" alt={t('swapSwapSwitch')} width="12" height="16" />
</button>
</div> </div>
<div className="build-quote__dropdown-swap-to-header"> <div className="build-quote__dropdown-swap-to-header">
<div className="build-quote__input-label">{t('swapSwapTo')}</div> <div className="build-quote__input-label">{t('swapSwapTo')}</div>

@ -60,11 +60,8 @@
flex: 0 0 auto; flex: 0 0 auto;
height: 16px; height: 16px;
width: 12px; width: 12px;
background-image: url(/images/icons/swap2.svg);
background-size: contain;
background-repeat: no-repeat;
position: absolute;
cursor: pointer; cursor: pointer;
background: unset;
} }
&__max-button { &__max-button {

@ -12,6 +12,7 @@
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
cursor: pointer; cursor: pointer;
background: unset;
&--open { &--open {
margin-bottom: 8px; margin-bottom: 8px;

@ -35,7 +35,7 @@ export default function SlippageButtons ({
return ( return (
<div className="slippage-buttons"> <div className="slippage-buttons">
<div <button
onClick={() => setOpen(!open)} onClick={() => setOpen(!open)}
className={classnames('slippage-buttons__header', { className={classnames('slippage-buttons__header', {
'slippage-buttons__header--open': open, 'slippage-buttons__header--open': open,
@ -43,7 +43,7 @@ export default function SlippageButtons ({
> >
<div className="slippage-buttons__header-text">{t('swapsAdvancedOptions')}</div> <div className="slippage-buttons__header-text">{t('swapsAdvancedOptions')}</div>
{open ? <i className="fa fa-angle-up" /> : <i className="fa fa-angle-down" />} {open ? <i className="fa fa-angle-up" /> : <i className="fa fa-angle-down" />}
</div> </button>
<div className="slippage-buttons__content"> <div className="slippage-buttons__content">
{open && ( {open && (
<div className="slippage-buttons__dropdown-content"> <div className="slippage-buttons__dropdown-content">

Loading…
Cancel
Save