From 51ddc912267bda365b7a6fff5e9228a0419b6f0d Mon Sep 17 00:00:00 2001 From: jaydonkrooss <147423601+jaydonkrooss@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:49:32 -0400 Subject: [PATCH] 427: fix section selection styling by refactoring ListItem Button (#439) * 427: fix section selection styling by refactoring List Item Button component, move unmerge button * Edit unmerge layout, clean up styling * fix loading backdrop nesting in merge sections * restore ListItem highlighting --- .../src/components/SectionSelectorWidget.tsx | 59 ++++++++----------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/ccm_web/client/src/components/SectionSelectorWidget.tsx b/ccm_web/client/src/components/SectionSelectorWidget.tsx index cdccbaac..b0ea817b 100644 --- a/ccm_web/client/src/components/SectionSelectorWidget.tsx +++ b/ccm_web/client/src/components/SectionSelectorWidget.tsx @@ -3,8 +3,8 @@ import { styled } from '@mui/material/styles' import { useSnackbar } from 'notistack' import { Backdrop, + Box, Button, - ButtonBase, Checkbox, CircularProgress, FormControl, @@ -14,7 +14,7 @@ import { GridSize, InputLabel, List, - ListItem, + ListItemButton, ListItemText, Menu, MenuItem, @@ -74,11 +74,6 @@ const Root = styled('div')(( '& > .MuiListItemText-root': { '& > :not(.MuiListItemText-secondary)': { opacity: theme.palette.action.disabledOpacity - }, - '& .MuiListItemText-secondary': { - '& > Button': { - pointerEvents: 'auto' - } } } } @@ -181,7 +176,7 @@ const Root = styled('div')(( [`& .${classes.button}`]: { margin: theme.spacing(1), - marginLeft: '24px' + marginLeft: '24px', } })) @@ -397,7 +392,7 @@ function SectionSelectorWidget (props: ISectionSelectorWidgetProps): JSX.Element if (section.nonxlist_course_id !== null && props.canUnmerge && (section.locked ?? false)) { return (