mirror of https://github.com/sveltejs/svelte
parent
82b8267689
commit
4bbdf77601
@ -1,13 +1,13 @@
|
||||
<script>
|
||||
import IconA from './IconA.svelte';
|
||||
import IconB from './IconB.svelte';
|
||||
import IconA from './IconA.svelte';
|
||||
import IconB from './IconB.svelte';
|
||||
|
||||
let variable = false;
|
||||
let variable = false;
|
||||
</script>
|
||||
|
||||
<button on:click={() => variable = !variable}>Click Me</button>
|
||||
<div>
|
||||
<slot>
|
||||
<svelte:component this={variable ? IconA : IconB} />
|
||||
</slot>
|
||||
<slot>
|
||||
<svelte:component this={variable ? IconA : IconB} />
|
||||
</slot>
|
||||
</div>
|
||||
|
Loading…
Reference in new issue