feat(recursive-list): rename children prop to nodes for Svelte 5 compatibility

This commit is contained in:
Eric Liu 2024-10-20 15:05:43 -07:00
commit 242e2fcbdf
5 changed files with 19 additions and 19 deletions

View file

@ -5,10 +5,10 @@
*/
/**
* Specify the children to render
* @type {Array<RecursiveListNode & { children?: RecursiveListNode[]; }>}
* Specify the nodes to render
* @type {Array<RecursiveListNode & { nodes?: RecursiveListNode[]; }>}
*/
export let children = [];
export let nodes = [];
/**
* Specify the type of list to render
@ -26,8 +26,8 @@
native="{type === 'ordered-native'}"
{...$$restProps}
>
{#each children as child}
{#if Array.isArray(child.children)}
{#each nodes as child}
{#if Array.isArray(child.nodes)}
<RecursiveListItem {...child}>
<svelte:self {...child} type="{type}" nested />
</RecursiveListItem>