Skip to content

Commit

Permalink
Update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaldebane committed Feb 16, 2024
1 parent e720162 commit 7e2ab02
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,13 @@
}
function increment() {
logs = ["$state++", "", ...logs];
logs = ["$state++", ...logs];
$state++;
}
</script>

<h1>state = {$state}</h1>
<button on:click={increment}>Increment</button>
{#each logs as log}
<p class={log === "$state++" ? "highlighted" : ""}>{log}</p>
<p style={log === "$state++" ? "color: green;": ""}>{log}</p>
{/each}

<style>
.highlighted {
color: green;
}
</style>

0 comments on commit 7e2ab02

Please sign in to comment.