-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fixed bug with cloning and annotations, added swap button
- Loading branch information
Showing
9 changed files
with
159 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
.../components/EditStudyComponents/EditStudySwapVersionButton/EditStudySwapVersionButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Button, ButtonGroup, ListItem, ListItemButton, Menu } from '@mui/material'; | ||
import SwapHorizIcon from '@mui/icons-material/SwapHoriz'; | ||
import { useState } from 'react'; | ||
import OpenInNewIcon from '@mui/icons-material/OpenInNew'; | ||
|
||
const EditStudySwapVersionButton: React.FC = (props) => { | ||
const [anchorEl, setAnchorEl] = useState<null | HTMLButtonElement>(null); | ||
const open = Boolean(anchorEl); | ||
|
||
const handleButtonPress = (event: React.MouseEvent<HTMLButtonElement>) => { | ||
setAnchorEl(event.currentTarget); | ||
}; | ||
|
||
const handleCloseNavMenu = () => { | ||
setAnchorEl(null); | ||
}; | ||
|
||
const handleSwapStudy = () => {}; | ||
|
||
return ( | ||
<> | ||
<Button | ||
sx={{ width: '280px', height: '36px' }} | ||
variant="contained" | ||
disableElevation | ||
color="secondary" | ||
onClick={handleButtonPress} | ||
startIcon={<SwapHorizIcon />} | ||
> | ||
Switch study version | ||
</Button> | ||
<Menu | ||
open={open} | ||
onClose={handleCloseNavMenu} | ||
anchorEl={anchorEl} | ||
anchorOrigin={{ vertical: 'top', horizontal: 'left' }} | ||
transformOrigin={{ vertical: 'bottom', horizontal: 'left' }} | ||
> | ||
<ListItem sx={{ padding: '0 1rem' }}> | ||
<ButtonGroup variant="text"> | ||
<Button> | ||
Version 238iERGtug | Owner: Neurosynth | Last Updated: Oct 28 2023 | ||
</Button> | ||
<Button endIcon={<OpenInNewIcon />}>View </Button> | ||
</ButtonGroup> | ||
</ListItem> | ||
<ListItem sx={{ padding: '0 1rem' }}> | ||
<ButtonGroup variant="text"> | ||
<Button> | ||
Version 238iERGtug | Owner: Neurosynth | Last Updated: Oct 28 2023 | ||
</Button> | ||
<Button endIcon={<OpenInNewIcon />}>View </Button> | ||
</ButtonGroup> | ||
</ListItem> | ||
<ListItem sx={{ padding: '0 1rem' }}> | ||
<ButtonGroup variant="text"> | ||
<Button> | ||
Version 238iERGtug | Owner: Neurosynth | Last Updated: Oct 28 2023 | ||
</Button> | ||
<Button endIcon={<OpenInNewIcon />}>View </Button> | ||
</ButtonGroup> | ||
</ListItem> | ||
</Menu> | ||
</> | ||
); | ||
}; | ||
|
||
export default EditStudySwapVersionButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters