UserDetails refactor, adding variable to css

This commit is contained in:
apanizo 2018-09-28 14:24:17 +02:00
parent 84b456f33b
commit 5ef120f327
1 changed files with 8 additions and 4 deletions

View File

@ -11,10 +11,10 @@ import Img from '~/components/layout/Img'
import Row from '~/components/layout/Row' import Row from '~/components/layout/Row'
import Block from '~/components/layout/Block' import Block from '~/components/layout/Block'
import Spacer from '~/components/Spacer' import Spacer from '~/components/Spacer'
import { xs, sm, md, lg, background } from '~/theme/variables' import { xs, sm, md, lg, background, secondary } from '~/theme/variables'
import { upperFirst } from '~/utils/css' import { upperFirst } from '~/utils/css'
import { shortVersionOf } from '~/logic/wallets/ethAddresses' import { shortVersionOf } from '~/logic/wallets/ethAddresses'
import { openInEtherScan } from '~/logic/wallets/getWeb3' import { openAddressInEtherScan } from '~/logic/wallets/getWeb3'
const metamask = require('../../assets/metamask.svg') const metamask = require('../../assets/metamask.svg')
const connectedLogo = require('../../assets/connected.svg') const connectedLogo = require('../../assets/connected.svg')
@ -32,7 +32,7 @@ type Props = {
const openIconStyle = { const openIconStyle = {
height: '16px', height: '16px',
color: '#467ee5', color: secondary,
} }
const styles = () => ({ const styles = () => ({
@ -97,7 +97,11 @@ const UserDetails = ({
<Block align="center" className={classes.user}> <Block align="center" className={classes.user}>
<Paragraph className={classes.address} size="sm" noMargin>{address}</Paragraph> <Paragraph className={classes.address} size="sm" noMargin>{address}</Paragraph>
{ userAddress && { userAddress &&
<OpenInNew className={classes.open} style={openIconStyle} onClick={openInEtherScan(userAddress, network)} /> <OpenInNew
className={classes.open}
style={openIconStyle}
onClick={openAddressInEtherScan(userAddress, network)}
/>
} }
</Block> </Block>
</Block> </Block>