MCPcopy Create free account
hub / github.com/stackblitz/bolt.new / toggleCollapseState

Function toggleCollapseState

app/components/workbench/FileTree.tsx:99–111  ·  view source on GitHub ↗
(fullPath: string)

Source from the content-addressed store, hash-verified

97 }, [fileList, collapsedFolders]);
98
99 const toggleCollapseState = (fullPath: string) => {
100 setCollapsedFolders((prevSet) => {
101 const newSet = new Set(prevSet);
102
103 if (newSet.has(fullPath)) {
104 newSet.delete(fullPath);
105 } else {
106 newSet.add(fullPath);
107 }
108
109 return newSet;
110 });
111 };
112
113 return (
114 <div className={classNames('text-sm', className)}>

Callers 1

FileTree.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected