diff --git a/src/lib/components/TreeList.svelte b/src/lib/components/TreeList.svelte index 8f22c9b3e..e820e78d7 100644 --- a/src/lib/components/TreeList.svelte +++ b/src/lib/components/TreeList.svelte @@ -2,10 +2,22 @@ import { cls } from '$lib/utils/styles'; import { getComponentTheme } from './theme'; + type Node = { id: number; name: string; level: number; children: Node[] }; + /** + * An array of nodes containing custom metadata and an array of child nodes + * @param {Array} nodes - An array of Node Objects each containing a children: Node[] attribute. + * Example: type Node = { name: string; children: Node[] } + */ export let nodes: Node[]; + /** + * Allows for conditional classes to be applied to each tag