docs: remove unnecessary thing

pull/8425/head
ayub 4 years ago
parent b8959ac09e
commit f90cbd2171

@ -1,12 +1,10 @@
<script>
import RedThing from './RedThing.svelte';
import GreenThing from './GreenThing.svelte';
import BlueThing from './BlueThing.svelte';
const options = [
{ color: 'red', component: RedThing },
{ color: 'green', component: GreenThing },
{ color: 'blue', component: BlueThing },
];
let selected = options[0];
@ -22,6 +20,4 @@
<RedThing/>
{:else if selected.color === 'green'}
<GreenThing/>
{:else if selected.color === 'blue'}
<BlueThing/>
{/if}
{/if}

@ -1,7 +0,0 @@
<strong>Blue thing</strong>
<style>
strong {
color: blue;
}
</style>

@ -1,12 +1,10 @@
<script>
import RedThing from './RedThing.svelte';
import GreenThing from './GreenThing.svelte';
import BlueThing from './BlueThing.svelte';
const options = [
{ color: 'red', component: RedThing },
{ color: 'green', component: GreenThing },
{ color: 'blue', component: BlueThing },
];
let selected = options[0];
@ -18,4 +16,4 @@
{/each}
</select>
<svelte:component this={selected.component}/>
<svelte:component this={selected.component}/>

@ -1,7 +0,0 @@
<strong>Blue thing</strong>
<style>
strong {
color: blue;
}
</style>

@ -9,8 +9,6 @@ A component can change its category altogether with `<svelte:component>`. Instea
<RedThing/>
{:else if selected.color === 'green'}
<GreenThing/>
{:else if selected.color === 'blue'}
<BlueThing/>
{/if}
```
@ -20,4 +18,4 @@ A component can change its category altogether with `<svelte:component>`. Instea
<svelte:component this={selected.component}/>
```
The `this` value can be any component constructor, or a falsy value — if it's falsy, no component is rendered.
The `this` value can be any component constructor, or a falsy value — if it's falsy, no component is rendered.

Loading…
Cancel
Save