mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
256 B
17 lines
256 B
6 years ago
|
<script>
|
||
6 years ago
|
export let div;
|
||
|
export let visible;
|
||
|
|
||
|
function fade(node, params) {
|
||
|
return {
|
||
|
duration: 400,
|
||
|
tick: t => {
|
||
|
node.style.opacity = t;
|
||
6 years ago
|
}
|
||
6 years ago
|
};
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
{#if visible}
|
||
6 years ago
|
<div out:fade style="opacity: 1;" bind:this={div}>yes</div>
|
||
6 years ago
|
{/if}
|