2024-08-22 11:38:19 -04:00
|
|
|
<script lang="ts">
|
|
|
|
|
import Tree from '$lib/components/shared-components/tree/tree.svelte';
|
2025-06-09 11:02:16 -04:00
|
|
|
import { type TreeNode } from '$lib/utils/tree-utils';
|
2024-08-22 11:38:19 -04:00
|
|
|
|
2024-11-14 08:43:25 -06:00
|
|
|
interface Props {
|
2025-06-09 11:02:16 -04:00
|
|
|
tree: TreeNode;
|
|
|
|
|
active: string;
|
2024-11-14 08:43:25 -06:00
|
|
|
icons: { default: string; active: string };
|
|
|
|
|
getLink: (path: string) => string;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-09 11:02:16 -04:00
|
|
|
let { tree, active, icons, getLink }: Props = $props();
|
2024-08-22 11:38:19 -04:00
|
|
|
</script>
|
|
|
|
|
|
2025-04-28 09:53:53 -04:00
|
|
|
<ul class="list-none ms-2">
|
2025-06-09 11:02:16 -04:00
|
|
|
{#each tree.children as node (node.color ? node.path + node.color : node.path)}
|
|
|
|
|
<li>
|
|
|
|
|
<Tree {node} {icons} {active} {getLink} />
|
|
|
|
|
</li>
|
2024-08-22 11:38:19 -04:00
|
|
|
{/each}
|
|
|
|
|
</ul>
|