about summary refs log tree commit diff stats
path: root/src/App.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/App.svelte')
-rw-r--r--src/App.svelte14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/App.svelte b/src/App.svelte
index a273fcc..27f7f73 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -1,7 +1,17 @@
-<script></script>
+<script>
+  import { level } from "./stores";
+
+  function levelChanged(evt) {
+    level.set(Number(evt.data));
+  }
+</script>
 
 <div class="app">
-  <h2>Level: <input type="number" min="1" max="60" /></h2>
+  <h2>
+    Level: <input on:input={levelChanged} type="number" min="1" max="60" />
+  </h2>
+
+  Level is {$level}
 </div>
 
 <style></style>