diff --git a/sites/skeleton.dev/src/routes/(inner)/elements/chips/+page.svelte b/sites/skeleton.dev/src/routes/(inner)/elements/chips/+page.svelte index dab06ad63..846df172e 100644 --- a/sites/skeleton.dev/src/routes/(inner)/elements/chips/+page.svelte +++ b/sites/skeleton.dev/src/routes/(inner)/elements/chips/+page.svelte @@ -46,7 +46,7 @@ color = c; } - function filter(flavor: string): void { + function toggle(flavor: string): void { flavors[flavor] = !flavors[flavor]; } @@ -161,7 +161,7 @@ { filter(f); }} + on:click={() => { toggle(f); }} on:keypress > {#if flavors[f]}{/if} @@ -179,6 +179,14 @@ let flavors: Record = { chocolate: false, strawberry: false }; +`} + /> + = { {#each Object.keys(flavors) as f} { filter(f); }} + on:click={() => { toggle(f); }} on:keypress > {#if flavors[f]}(icon){/if}