diff --git a/packages/components/src/components/SquiggleItem.tsx b/packages/components/src/components/SquiggleItem.tsx index 647cc08c..e9b9c2f6 100644 --- a/packages/components/src/components/SquiggleItem.tsx +++ b/packages/components/src/components/SquiggleItem.tsx @@ -48,24 +48,41 @@ const VariableBox: React.FC = ({ children, }) => { const [isCollapsed, setIsCollapsed] = useState(false); + + const toggleCollapsed = () => { + setIsCollapsed(!isCollapsed); + }; + return (
- {name ? ( -
setIsCollapsed(!isCollapsed)} - > - {name ? ( - - {name}: - - ) : null} - {isCollapsed ? ( - ... - ) : null} -
- ) : null} - {isCollapsed ? null :
{children}
} +
+ {name ? ( +
+ {name ? ( + + {name}: + + ) : null} + {isCollapsed ? ( + ... + ) : null} +
+ ) : null} + {isCollapsed ? null : ( +
+ {name ? ( +
+ ) : null} +
{children}
+
+ )} +
); }; @@ -76,7 +93,7 @@ const VariableList: React.FC<{ children: React.ReactNode; }> = ({ name, heading, children }) => ( -
+
{children}