mirror of https://github.com/sveltejs/svelte
21 lines
263 B
21 lines
263 B
4 years ago
|
<script>
|
||
|
import { fly } from 'svelte/transition';
|
||
|
|
||
|
let number = 0;
|
||
|
</script>
|
||
|
|
||
|
<div>
|
||
|
The number is:
|
||
|
<span style="display: inline-block" in:fly={{ y: -20 }}>
|
||
|
{number}
|
||
|
</span>
|
||
|
</div>
|
||
|
<br />
|
||
|
<button
|
||
|
on:click={() => {
|
||
|
number += 1;
|
||
2 years ago
|
}}
|
||
|
>
|
||
4 years ago
|
Increment
|
||
|
</button>
|