You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/self-reference-tree/main.html

11 lines
225 B

<article class='file {file.type}'>
<span class='name'>{file.name}</span>
{#if file.type === 'folder'}
<ul>
{#each file.children as child}
<li><svelte:self file='{child}'/></li>
{/each}
</ul>
{/if}
</article>