Simplify each block bindings example (#5094)

No need for CSS here, the same effect could be achieved with just a `disabled` binding.
pull/5148/head
Stanislav Lashmanov 5 years ago committed by GitHub
parent fc7e99e9f0
commit 5c6730e382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,16 +16,10 @@
$: remaining = todos.filter(t => !t.done).length;
</script>
<style>
.done {
opacity: 0.4;
}
</style>
<h1>Todos</h1>
{#each todos as todo}
<div class:done={todo.done}>
<div>
<input
type=checkbox
bind:checked={todo.done}
@ -34,6 +28,7 @@
<input
placeholder="What needs to be done?"
bind:value={todo.text}
disabled={todo.done}
>
</div>
{/each}

Loading…
Cancel
Save