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/packages/svelte/test/runtime/samples/bind-this-transition-js-if-.../main.svelte

17 lines
282 B

<script>
export let el;
export let show;
function foo(node) {
return {
duration: 100
};
}
</script>
{#if show=="a"}
<div class="first" bind:this={el} transition:foo>first</div>
{:else if show=="b"}
<div class="second" bind:this={el} transition:foo>second</div>
{/if}