From 26370da13d7bed06d59efeba0a4921387b874e06 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 21 May 2018 16:35:49 -0700 Subject: Rewrite balance rows using flex box --- packages/website/ts/components/ui/token_icon.tsx | 25 +++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'packages/website/ts/components/ui/token_icon.tsx') diff --git a/packages/website/ts/components/ui/token_icon.tsx b/packages/website/ts/components/ui/token_icon.tsx index a9ad567ef..0875cc56b 100644 --- a/packages/website/ts/components/ui/token_icon.tsx +++ b/packages/website/ts/components/ui/token_icon.tsx @@ -6,6 +6,7 @@ import { Token } from 'ts/types'; interface TokenIconProps { token: Token; diameter: number; + link?: string; } interface TokenIconState {} @@ -14,14 +15,20 @@ export class TokenIcon extends React.Component { public render(): React.ReactNode { const token = this.props.token; const diameter = this.props.diameter; - return ( -
- {token.isRegistered && !_.isUndefined(token.iconUrl) ? ( - - ) : ( - - )} -
- ); + const icon = + token.isRegistered && !_.isUndefined(token.iconUrl) ? ( + + ) : ( + + ); + if (_.isEmpty(this.props.link)) { + return icon; + } else { + return ( + + {icon} + + ); + } } } -- cgit v1.2.3