From e4bff0565b5c5d026ad63109cb8aa6ac0aeba009 Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Fri, 18 Mar 2022 12:41:22 +0000 Subject: [PATCH] Styled the tree view --- app/components/JsonTreeView.tsx | 56 ++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/app/components/JsonTreeView.tsx b/app/components/JsonTreeView.tsx index eae4abb..113670d 100644 --- a/app/components/JsonTreeView.tsx +++ b/app/components/JsonTreeView.tsx @@ -131,15 +131,15 @@ function TreeViewNode({ ref={elementRef} >
-
+
{node.children && node.children.length > 0 && ( { @@ -150,22 +150,56 @@ function TreeViewNode({ }} > {virtualNode.isCollapsed ? ( - + ) : ( - + )} )} - {node.longTitle ?? node.name} + + {node.longTitle ?? node.name} +
-
+
- {node.icon && } + {node.icon && ( + + )} {node.subtitle && ( - + {node.subtitle} )}