Created
September 12, 2021 21:07
-
-
Save TheOnlyTails/7ecbd032db9fbc8c93a12f7609c36e52 to your computer and use it in GitHub Desktop.
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 lang="ts"> | |
let count = 0; | |
</script> | |
<button on:click={() => count++}>{count}</button> | |
<style> | |
button { | |
color: red; | |
} | |
</style> |
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
val counter by svelte { | |
var count by 0.state | |
template(/* optional parameter to specify HTML preprocessing with svelte-preprocess */) { | |
// write kotlinx.html code here | |
button() { | |
onClickFunction = { count++ } | |
+count | |
} | |
} | |
style(/* optional parameter to specify CSS preprocessing with svelte-preprocess */) { | |
button { | |
color = Color.red | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment