Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

(Feature) Etherscan button icon #331

Merged
merged 4 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/EtherscanBtn/img/etherscan-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions src/components/EtherscanBtn/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ import React from 'react'
import Tooltip from '@material-ui/core/Tooltip'
import { makeStyles } from '@material-ui/core/styles'
import Img from '~/components/layout/Img'
import EtherscanOpenIcon from './img/etherscan-open.svg'
import { getEtherScanLink } from '~/logic/wallets/getWeb3'
import { xs } from '~/theme/variables'
import SearchIcon from './search.svg'

const useStyles = makeStyles({
container: {
alignItems: 'center',
borderRadius: '50%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
margin: `0 ${xs}`,
borderRadius: '50%',
padding: '0',
transition: 'background-color .2s ease-in-out',
'&:hover': {
backgroundColor: '#F0EFEE',
Expand All @@ -37,13 +38,13 @@ const EtherscanBtn = ({ type, value, increaseZindex = false }: EtherscanBtnProps
return (
<Tooltip title="Show details on Etherscan" placement="top" classes={customClasses}>
<a
aria-label="Show details on Etherscan"
className={classes.container}
href={getEtherScanLink(type, value)}
target="_blank"
rel="noopener noreferrer"
aria-label="Show details on Etherscan"
target="_blank"
>
<Img src={SearchIcon} height={20} alt="Etherscan" />
<Img src={EtherscanOpenIcon} height={20} alt="Show on Etherscan" />
</a>
</Tooltip>
)
Expand Down
5 changes: 0 additions & 5 deletions src/components/EtherscanBtn/search.svg

This file was deleted.

Loading