|
|
|
@ -2,11 +2,10 @@
|
|
|
|
import Thing from './Thing.svelte';
|
|
|
|
import Thing from './Thing.svelte';
|
|
|
|
|
|
|
|
|
|
|
|
let things = [
|
|
|
|
let things = [
|
|
|
|
{ id: 1, color: 'darkblue' },
|
|
|
|
{ id: 1, color: '#3B82F6' },
|
|
|
|
{ id: 2, color: 'indigo' },
|
|
|
|
{ id: 2, color: '#10B981' },
|
|
|
|
{ id: 3, color: 'deeppink' },
|
|
|
|
{ id: 3, color: '#EF4444' },
|
|
|
|
{ id: 4, color: 'salmon' },
|
|
|
|
{ id: 4, color: '#EAB308' },
|
|
|
|
{ id: 5, color: 'gold' }
|
|
|
|
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
function handleClick() {
|
|
|
|
function handleClick() {
|
|
|
|
@ -19,5 +18,5 @@
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
{#each things as thing (thing.id)}
|
|
|
|
{#each things as thing (thing.id)}
|
|
|
|
<Thing current={thing.color}/>
|
|
|
|
<Thing current={thing.color} />
|
|
|
|
{/each}
|
|
|
|
{/each}
|