Adding copy icon to home screen account address (#11460)

* Adding copy icon to home screen account address

Fixes MetaMask/metamask-extension#10145

* Using margin-inline-start
feature/default_network_editable
ryanml 3 years ago committed by GitHub
parent cbe1d09396
commit 68ad9c619f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      ui/components/app/selected-account/index.scss
  2. 4
      ui/components/app/selected-account/selected-account.component.js

@ -26,6 +26,8 @@
@include H7;
color: #989a9b;
display: flex;
align-items: center;
}
&__clickable {
@ -48,4 +50,10 @@
background-color: #d9d7da;
}
}
&__copy {
height: 13px;
display: inline-block;
margin-inline-start: 3px;
}
}

@ -4,6 +4,7 @@ import copyToClipboard from 'copy-to-clipboard';
import { shortenAddress } from '../../../helpers/utils/util';
import Tooltip from '../../ui/tooltip';
import CopyIcon from '../../ui/icon/copy-icon.component';
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
import { SECOND } from '../../../../shared/constants/time';
@ -61,6 +62,9 @@ class SelectedAccount extends Component {
</div>
<div className="selected-account__address">
{shortenAddress(checksummedAddress)}
<div className="selected-account__copy">
<CopyIcon size={11} color="#989a9b" />
</div>
</div>
</button>
</Tooltip>

Loading…
Cancel
Save