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