Skip to content

Commit

Permalink
[docs] add <svelte:element> example (#7439)
Browse files Browse the repository at this point in the history
  • Loading branch information
oekazuma committed Apr 10, 2022
1 parent 467ba0a commit 707455f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"title": "<svelte:element>"
}

0 comments on commit 707455f

Please sign in to comment.