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.
svelte/test/runtime/samples/transition-css-in-out-in-wi.../main.svelte

26 lines
386 B

<script>
export let visible = false;
export let param = false;
function getInParam() {
return {
duration: param ? 20 : 10,
css: t => {
return `opacity: ${t}`;
}
};
}
function getOutParam() {
return {
duration: param ? 15 : 5,
css: t => {
return `opacity: ${t}`;
}
};
}
</script>
{#if visible}
<div in:getInParam out:getOutParam></div>
{/if}