-
-
Notifications
You must be signed in to change notification settings - Fork 280
Expand file tree
/
Copy path_Simple.svelte
More file actions
24 lines (19 loc) · 592 Bytes
/
Copy path_Simple.svelte
File metadata and controls
24 lines (19 loc) · 592 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<FormField align="end" style="display: flex;">
<Slider style="flex-grow: 1;" bind:value />
{#snippet label()}
<span style="padding-inline-end: 12px; width: max-content; display: block;">
Amount of Wonder
</span>
{/snippet}
</FormField>
{#if value == 0}
<p>No wonder.</p>
{/if}
<div><Button onclick={() => (value = 100)}>Maximum Wonder!</Button></div>
<pre class="status">Value: {value}</pre>
<script lang="ts">
import Slider from '@smui/slider';
import FormField from '@smui/form-field';
import Button from '@smui/button';
let value = $state(50);
</script>