Skip to content

Instantly share code, notes, and snippets.

@omirobarcelo
Created December 18, 2020 13:15
Show Gist options
  • Save omirobarcelo/e0aca589a33289cf16eba3b988b0c13f to your computer and use it in GitHub Desktop.
Save omirobarcelo/e0aca589a33289cf16eba3b988b0c13f to your computer and use it in GitHub Desktop.
Svelte-Fluid Hello World's App.svelte
<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