Created
December 18, 2020 13:15
-
-
Save omirobarcelo/e0aca589a33289cf16eba3b988b0c13f to your computer and use it in GitHub Desktop.
Svelte-Fluid Hello World's 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> | |
export let store; | |
const getDieUnicode = (value) => String.fromCodePoint(0x267F + value); | |
</script> | |
<style></style> | |
<div class="text-center"> | |
<div style="font-size: 200px; color: {`hsl(${$store * 60}, 70%, 50%)`}"> | |
{getDieUnicode($store)} | |
</div> | |
<button | |
on:click={store.roll} | |
class="text-5xl bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded" | |
> | |
Roll | |
</button> | |
</div> | |
<div>{$store}</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment