<div class="catalog-row">
<Button onClick={() => setExpandedPaths(['src', 'docs'])}>
Expand all
</Button>
<Button onClick={() => setExpandedPaths([])}>Collapse all</Button>
</div>
<FileTree
label="Project changes"
defaultValue="src/main.ts"
expanded={expandedPaths}
onExpandedChange={setExpandedPaths}
nodes={[
{
type: 'folder',
name: 'src',
path: 'src',
children: [
{
type: 'file',
name: 'main.ts',
path: 'src/main.ts',
status: 'modified',
},
{
type: 'file',
name: 'format.ts',
path: 'src/format.ts',
status: 'added',
},
],
},
{
type: 'folder',
name: 'docs',
path: 'docs',
children: [
{ type: 'file', name: 'notes.md', path: 'docs/notes.md' },
],
},
{
type: 'file',
name: 'legacy.md',
path: 'legacy.md',
status: 'deleted',
},
]}
/>