Merge pull request #38 from CPSC319-Winter-term-2/mbalsdon-sidebar-overlap-fix

(mostly) fix gear icon overlap bug
This commit is contained in:
cth0604 2022-03-25 00:04:54 -07:00 committed by GitHub
commit 478ebc7881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -16,7 +16,7 @@ import SidebarUser from "./SidebarUser";
// TODO: toolbar on top of sidebar since it goes under the navbar // TODO: toolbar on top of sidebar since it goes under the navbar
const drawerWidth = 200; const drawerWidth = "200px";
const Sidebar: React.FC = () => { const Sidebar: React.FC = () => {
const [group, setGroup] = useState<string>("Favorites"); const [group, setGroup] = useState<string>("Favorites");
@ -33,15 +33,16 @@ const Sidebar: React.FC = () => {
selectUserStatuses(state, groupMembersUuids) selectUserStatuses(state, groupMembersUuids)
); );
console.log(group);
return ( return (
<Drawer <Drawer
sx={{ sx={{
width: drawerWidth, width: drawerWidth,
"& .MuiDrawer-paper": { "& .MuiDrawer-paper": {
width: drawerWidth, width: drawerWidth,
position: "static",
height: "100%",
}, },
height: "100%",
}} }}
variant="permanent" variant="permanent"
anchor="right" anchor="right"

View File

@ -11,7 +11,7 @@ interface Props {
const SidebarUser: React.FC<Props> = ({ user, status }: Props) => { const SidebarUser: React.FC<Props> = ({ user, status }: Props) => {
return ( return (
<Box sx={{ display: "flex", flexDirection: "row", p: 1 }}> <Box sx={{ width: "100%", display: "flex", flexDirection: "row", p: 1 }}>
<Box <Box
bgcolor={getStatusColor( bgcolor={getStatusColor(
status.inMeeting status.inMeeting
@ -20,7 +20,7 @@ const SidebarUser: React.FC<Props> = ({ user, status }: Props) => {
)} )}
sx={{ p: 1 }} sx={{ p: 1 }}
/> />
<Box sx={{ display: "flex", flexDirection: "column", ml: 1 }}> <Box sx={{ width: "80%", display: "flex", flexDirection: "column", ml: 1 }}>
<Typography variant="h6">{user.name}</Typography> <Typography variant="h6">{user.name}</Typography>
<Typography variant="caption"> <Typography variant="caption">
{status.inMeeting {status.inMeeting
@ -28,8 +28,10 @@ const SidebarUser: React.FC<Props> = ({ user, status }: Props) => {
: MeetingStatus.NOT_IN_MEETING} : MeetingStatus.NOT_IN_MEETING}
</Typography> </Typography>
</Box> </Box>
<Box sx={{ width: "20%" }}>
<SettingsButton user={user} status={status} /> <SettingsButton user={user} status={status} />
</Box> </Box>
</Box>
); );
}; };