mirror of https://github.com/sveltejs/svelte
[docs] add `<svelte:element>` example (#7439)
parent
467ba0a920
commit
707455fa8b
@ -0,0 +1,12 @@
|
||||
<script>
|
||||
const options = ['h1', 'h3', 'p'];
|
||||
let selected = options[0];
|
||||
</script>
|
||||
|
||||
<select bind:value={selected}>
|
||||
{#each options as option}
|
||||
<option value={option}>{option}</option>
|
||||
{/each}
|
||||
</select>
|
||||
|
||||
<svelte:element this={selected}>I'm a {selected} tag</svelte:element>
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"title": "<svelte:element>"
|
||||
}
|
Loading…
Reference in new issue