feat: Make comments fully collapse

This commit is contained in:
Xyphyn committed 2023-07-01 18:28:57 -07:00
1 parent 801278a1e1
commit 895a571e4f
3 files changed
+21 -7

No files matched your search

+6 -5
View File
@@ -11,12 +11,13 @@
<ul
class={isParent
? ''
: 'ml-2 mx-2.5 px-2.5 border-l-2 border-black/10 dark:border-white/10'}
: 'ml-2 mt-2 mx-2.5 px-2.5 border-l-2 border-black/10 dark:border-white/10'}
>
{#each nodes.slice(0, maxComments) as node}
<Comment {node} open={true} />
{#if node.children?.length > 0}
<svelte:self nodes={node.children} isParent={false} />
{/if}
<Comment {node} open={true}>
{#if node.children?.length > 0}
<svelte:self nodes={node.children} isParent={false} />
{/if}
</Comment>
{/each}
</ul>