feat: Make comments fully collapse
This commit is contained in:
1 parent
801278a1e1
commit
895a571e4f
3 files changed
+21
-7
No files matched your search
@@ -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>
|
||||
Reference in new issue
Block a user