diff --git a/src/components/sidebar/SettingsButton.tsx b/src/components/sidebar/SettingsButton.tsx new file mode 100644 index 0000000..2116d1d --- /dev/null +++ b/src/components/sidebar/SettingsButton.tsx @@ -0,0 +1,44 @@ +import { Settings } from "@mui/icons-material"; +import { IconButton, Menu, MenuItem } from "@mui/material"; +import { useState } from "react"; + + + +const SettingsButton: React.FC = () => { + + const [anchorEl, setAnchorEl] = useState(null); + const open = Boolean(anchorEl); + const handleClick = (event: React.MouseEvent) => { + setAnchorEl(event.currentTarget); + }; + const handleClose = () => { + setAnchorEl(null); + }; + + return ( +
+ + + + + Remove from Favourites + View current meeting + View upcoming meetings + Create meeting + +
+ ); +}; + +export default SettingsButton; \ No newline at end of file diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx index c6ad669..08cb47b 100644 --- a/src/components/sidebar/Sidebar.tsx +++ b/src/components/sidebar/Sidebar.tsx @@ -2,7 +2,7 @@ import { Divider, Drawer, List, ListItem, ListSubheader } from "@mui/material"; import GroupSelect from "./GroupSelect"; import SidebarUser, { SidebarUserObj } from "./SidebarUser"; -// TODO: SidebarUser icon button context menu +// TODO: toolbar on top of sidebar since it goes under the navbar const drawerWidth = 240; @@ -24,7 +24,7 @@ const Sidebar: React.FC = ({ users }: Props) => { variant="permanent" anchor="right" > - + diff --git a/src/components/sidebar/SidebarUser.tsx b/src/components/sidebar/SidebarUser.tsx index 8b84767..cfc14bc 100644 --- a/src/components/sidebar/SidebarUser.tsx +++ b/src/components/sidebar/SidebarUser.tsx @@ -1,5 +1,5 @@ -import { Settings } from "@mui/icons-material"; -import { Box, IconButton, Typography } from "@mui/material"; +import { Box, Typography } from "@mui/material"; +import SettingsButton from "./SettingsButton"; export interface SidebarUserObj { id: number, @@ -62,9 +62,7 @@ const SidebarUser: React.FC = ({ user }: Props) => { {user.name} {getMeetingStatusText(user.meetingStatus)} - - - + ); };