-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished base implementation of PR TODO: Put image upload button in i…
…mage gallery #1096
- Loading branch information
1 parent
92f9ecf
commit bc12f92
Showing
9 changed files
with
187 additions
and
116 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
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,52 @@ | ||
import MoreVertIcon from '@mui/icons-material/MoreVert'; | ||
import { ListItemIcon } from '@mui/material'; | ||
import Button from '@mui/material/Button'; | ||
import Menu from '@mui/material/Menu'; | ||
import MenuItem from '@mui/material/MenuItem'; | ||
import * as React from 'react'; | ||
|
||
export interface PrimaryOptionsInterface { | ||
setDialog: (arg: boolean) => void; | ||
} | ||
|
||
const PrimaryOptionsMenu = (props: PrimaryOptionsInterface) => { | ||
const { setDialog } = props; | ||
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null); | ||
const open = Boolean(anchorEl); | ||
const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => { | ||
setAnchorEl(event.currentTarget); | ||
}; | ||
const handleClose = () => { | ||
setDialog(true); | ||
setAnchorEl(null); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<Button | ||
id="basic-button" | ||
aria-controls={open ? 'basic-menu' : undefined} | ||
aria-haspopup="true" | ||
aria-expanded={open ? 'true' : undefined} | ||
onClick={handleClick} | ||
> | ||
<ListItemIcon> | ||
<MoreVertIcon /> | ||
</ListItemIcon> | ||
</Button> | ||
<Menu | ||
id="basic-menu" | ||
anchorEl={anchorEl} | ||
open={open} | ||
onClose={handleClose} | ||
MenuListProps={{ | ||
'aria-labelledby': 'basic-button', | ||
}} | ||
> | ||
<MenuItem onClick={handleClose}>Set Primary</MenuItem> | ||
</Menu> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PrimaryOptionsMenu; |
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
Oops, something went wrong.