Skip to content

Commit 9edf1aa

Browse files
committed
import works. still working on export
1 parent 7918971 commit 9edf1aa

File tree

4 files changed

+314
-221
lines changed

4 files changed

+314
-221
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import React, { useState } from 'react';
2+
// Import MUI components
3+
import Box from '@mui/material/Box';
4+
import List from '@mui/material/ListItem';
5+
import ListItem from '@mui/material/ListItem';
6+
import ListItemButton from '@mui/material/ListItemButton';
7+
import Collapse from '@mui/material/Collapse';
8+
import ListItemText from '@mui/material/ListItemText';
9+
import ExpandLess from '@mui/icons-material/ExpandLess';
10+
import ExpandMore from '@mui/icons-material/ExpandMore';
11+
12+
export default function ExportToGithubList({ workspaces }) {
13+
const [expand, setExpand] = useState(false);
14+
const handleListButtonClick = () => {
15+
setExpand(!expand);
16+
}
17+
18+
console.log('workspaces', workspaces)
19+
const workspacesList = [];
20+
for (let workspace of workspaces) {
21+
workspacesList.push(
22+
<ListItem disablePadding>
23+
<ListItemButton onClick={handleListButtonClick}>
24+
<ListItemText primary={workspace.name}/>
25+
{expand ? <ExpandLess /> : <ExpandMore />}
26+
</ListItemButton>
27+
<Collapse in={expand} timeout="auto" unmountOnExit>
28+
hello
29+
</Collapse>
30+
</ListItem>
31+
)
32+
}
33+
34+
return(
35+
{workspacesList}
36+
)
37+
38+
}
39+
40+
{/* <ListItem disablePadding>
41+
<ListItemButton onClick={handleExportToGithubListClick}>
42+
<ListItemIcon>
43+
<GitHubIcon/>
44+
</ListItemIcon>
45+
<ListItemText primary="Export to GitHub"/>
46+
{exportToGithubList ? <ExpandLess /> : <ExpandMore />}
47+
</ListItemButton>
48+
</ListItem>
49+
<Collapse in={exportToLocalFilesList} timeout="auto" unmountOnExit>
50+
{dbWorkspaces}
51+
</Collapse> */}

0 commit comments

Comments
 (0)