Last active
June 25, 2021 16:54
-
-
Save cabreraalex/6c1fdd9c1b6fc07836a5dbd619db5f1b to your computer and use it in GitHub Desktop.
widget-svelte-example App.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { value } from './stores'; | |
let localValue = $value; | |
</script> | |
<style> | |
h1 { | |
color: purple; | |
} | |
</style> | |
<h1>The value is: {$value}</h1> | |
<input bind:value={localValue} /> | |
<button on:click={() => value.set(localValue)}>Set Value</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment