/* @flow */ 'use strict'; import React from 'react'; import ColorHash from 'color-hash'; import ScaleText from 'react-scale-text'; import type { Token } from '../../../reducers/TokensReducer'; type Props = { tokens: Array, removeToken: (token: Token) => void } const SummaryTokens = (props: Props) => { if (!props.tokens || props.tokens.length < 1) return null; const bgColor = new ColorHash({lightness: 0.7}); const textColor = new ColorHash(); const tokens = props.tokens.map((token, index) => { let iconColor = { color: textColor.hex(token.name), background: bgColor.hex(token.name), borderColor: bgColor.hex(token.name) } return (

{ token.symbol }

{ token.name }
{ token.balance } { token.symbol }
) }); return (
{ tokens }
) } export default SummaryTokens;