mirror of https://github.com/sveltejs/svelte
commit
dcad65b118
@ -1,11 +1,11 @@
|
||||
<script>
|
||||
import { fade } from 'svelte/transition';
|
||||
|
||||
export let visible;
|
||||
let visible;
|
||||
</script>
|
||||
|
||||
<input type=checkbox bind:checked={visible}> visible
|
||||
|
||||
{#if visible}
|
||||
<p transition:fade>fades in and out</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
@ -1,11 +1,11 @@
|
||||
<script>
|
||||
import { fly } from 'svelte/transition';
|
||||
|
||||
export let visible;
|
||||
let visible;
|
||||
</script>
|
||||
|
||||
<input type=checkbox bind:checked={visible}> visible
|
||||
|
||||
{#if visible}
|
||||
<p transition:fly="{{y: 200, duration: 1000}}">flies 200 pixels up, slowly</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
@ -1,11 +1,11 @@
|
||||
<script>
|
||||
import { fade, fly } from 'svelte/transition';
|
||||
|
||||
export let visible;
|
||||
let visible;
|
||||
</script>
|
||||
|
||||
<input type=checkbox bind:checked={visible}> visible
|
||||
|
||||
{#if visible}
|
||||
<p in:fly="{{y: 50}}" out:fade>flies up, fades out</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
Loading…
Reference in new issue