Skip to content

Instantly share code, notes, and snippets.

Created Jul 21, 2017
What would you like to do?
Crypto Compare styling.
<tr v-for="coin in coins">
<td>{{ coin.rank }}</td>
<td><img v-bind:src="getCoinImage(coin.symbol)"> {{ }}</td>
<td>{{ coin.symbol }}</td>
<td>{{ coin.price_usd | currency }}</td>
<td v-bind:style="getColor(coin.percent_change_1h)">
<span v-if="coin.percent_change_1h > 0">+</span>{{ coin.percent_change_1h }}%
<td v-bind:style="getColor(coin.percent_change_24h)">
<span v-if="coin.percent_change_24h > 0">+</span>{{ coin.percent_change_24h }}%
<td v-bind:style="getColor(coin.percent_change_7d)">
<span v-if="coin.percent_change_7d > 0">+</span>{{ coin.percent_change_7d }}%
<td>{{ coin.market_cap_usd | currency }}</td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment