tree versuche

This commit is contained in:
2026-07-30 21:27:18 +02:00
parent 7ee2cf6c13
commit c50780b6cf
2 changed files with 4 additions and 16 deletions
@@ -11,9 +11,7 @@ const PropertySideBar = ({ properties }) => {
<div className="side-links">
<ul>
{properties.map((node) => (
<li key={node.id}>
{node.label}
</li>
<PropertyTreeView node={node} />
))}
</ul>
</div><div className="spacer">...</div>
@@ -2,7 +2,7 @@ import React from 'react';
import { useState } from 'react';
import { ChevronRightIcon } from '@heroicons/react/16/solid';
import { DocumentIcon, FolderIcon } from '@heroicons/react/24/solid';
import { DocumentIcon, FolderIcon } from '@heroicons/react/16/solid';
const PropertyTreeView = ({ node, key }) => {
const [expanded, setExpanded] = useState(true);
@@ -17,21 +17,11 @@ const PropertyTreeView = ({ node, key }) => {
/>
</button>
)}
{node.subPropertygroups ? (
<FolderIcon
className={`size-6 text-sky-500 ${
node.subPropertygroups.length === 0 ? 'ml-[22px]' : ''
}`}
/>
) : (
<DocumentIcon className="ml-[22px] size-6 text-gray-900" />
)}
{node.label}
<FolderIcon className={`size-3 text-gray-500`} />{node.label}
</span>
{expanded && (
<ul className="pl-6">
<ul>
{node.subPropertygroups?.map((node) => (
<PropertyTreeView node={node} key={node.id} />
))}