pull/5061/head
Conduitry 5 years ago
parent 42843868f0
commit 4ec84dc725

@ -1,5 +1,5 @@
<script> <script>
export let content; export let content;
</script> </script>
{@html content} {@html content}

@ -1,15 +1,15 @@
<script> <script>
import RawMustache from './RawMustache.svelte'; import RawMustache from './RawMustache.svelte';
let content1 = `<p>First line</p>`; let content1 = `<p>First line</p>`;
let content2 = `<p>Another first line</p>` let content2 = `<p>Another first line</p>`;
let show = false; let show = false;
$: content = show ? content1 : content2; $: content = show ? content1 : content2;
</script> </script>
<button on:click={() => show = !show}> <button on:click={() => show = !show}>
Switch Switch
</button> </button>
<RawMustache {content} /> <RawMustache {content} />

@ -1,17 +1,17 @@
<script> <script>
import Component from './Component.svelte'; import Component from './Component.svelte';
let content1 = `<p>First line</p>`; let content1 = `<p>First line</p>`;
let content2 = `<p>Another first line</p>` let content2 = `<p>Another first line</p>`
let show = false; let show = false;
$: content = show ? content1 : content2; $: content = show ? content1 : content2;
</script> </script>
<button on:click={() => show = !show}> <button on:click={() => show = !show}>
Switch Switch
</button> </button>
<Component> <Component>
{@html content} {@html content}
</Component> </Component>
Loading…
Cancel
Save