mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(recursive-list): rename children
prop to nodes
for Svelte 5 compatibility
This commit is contained in:
parent
44486080b8
commit
242e2fcbdf
5 changed files with 19 additions and 19 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue