Giving colours names improves understandability dramatically.

pull/5761/head
Aswin Vayiravan 6 years ago committed by GitHub
parent 36cef36066
commit b10bb6c6fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,12 +1,12 @@
<script> <script>
import Thing from './Thing.svelte'; import Thing from './Thing.svelte';
let things = [ let things = [
{ id: 1, color: '#0d0887' }, { id: 1, color: 'darkblue' },
{ id: 2, color: '#6a00a8' }, { id: 2, color: 'indigo' },
{ id: 3, color: '#b12a90' }, { id: 3, color: 'deeppink' },
{ id: 4, color: '#e16462' }, { id: 4, color: 'salmon' },
{ id: 5, color: '#fca636' } { id: 5, color: 'gold' }
]; ];
function handleClick() { function handleClick() {
@ -20,4 +20,4 @@
{#each things as thing (thing.id)} {#each things as thing (thing.id)}
<Thing current={thing.color}/> <Thing current={thing.color}/>
{/each} {/each}

Loading…
Cancel
Save