mirror of https://github.com/sveltejs/svelte
parent
42843868f0
commit
4ec84dc725
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
export let content;
|
||||
export let content;
|
||||
</script>
|
||||
|
||||
{@html content}
|
@ -1,17 +1,17 @@
|
||||
<script>
|
||||
import Component from './Component.svelte';
|
||||
import Component from './Component.svelte';
|
||||
|
||||
let content1 = `<p>First line</p>`;
|
||||
let content2 = `<p>Another first line</p>`
|
||||
let content1 = `<p>First line</p>`;
|
||||
let content2 = `<p>Another first line</p>`
|
||||
|
||||
let show = false;
|
||||
$: content = show ? content1 : content2;
|
||||
let show = false;
|
||||
$: content = show ? content1 : content2;
|
||||
</script>
|
||||
|
||||
<button on:click={() => show = !show}>
|
||||
Switch
|
||||
Switch
|
||||
</button>
|
||||
|
||||
<Component>
|
||||
{@html content}
|
||||
{@html content}
|
||||
</Component>
|
Loading…
Reference in new issue