From f5df854def95e35e6fc2b408ecf746dcc0a8d38a Mon Sep 17 00:00:00 2001 From: Sascha Date: Tue, 30 Mar 2021 15:51:36 +0200 Subject: Some changes to the label menu - Increase width of label menu - Use default selection styling instead of bold text - Use rem unit for labelcolor - Remove some tenary operator usage --- webui/src/pages/bug/labels/LabelMenu.tsx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'webui/src') diff --git a/webui/src/pages/bug/labels/LabelMenu.tsx b/webui/src/pages/bug/labels/LabelMenu.tsx index 5a70bd8a..01be11d8 100644 --- a/webui/src/pages/bug/labels/LabelMenu.tsx +++ b/webui/src/pages/bug/labels/LabelMenu.tsx @@ -50,7 +50,7 @@ const CustomTextField = withStyles((theme) => ({ const ITEM_HEIGHT = 48; const useStyles = makeStyles((theme) => ({ - element: { + gearBtn: { ...theme.typography.body2, color: theme.palette.text.secondary, padding: theme.spacing(0, 1), @@ -61,15 +61,14 @@ const useStyles = makeStyles((theme) => ({ border: 'none', }, menu: { - witdh: 'auto', - }, - itemActive: { - fontWeight: 600, - color: theme.palette.text.primary, + '& .MuiMenu-paper': { + //somehow using "width" won't override the default width... + minWidth: '35ch', + }, }, labelcolor: { - width: '15px', - height: '15px', + minWidth: '1rem', + minHeight: '1rem', display: 'flex', backgroundColor: 'blue', borderRadius: '0.25rem', @@ -82,7 +81,6 @@ const useStyles = makeStyles((theme) => ({ }, menuRow: { display: 'flex', - flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', }, @@ -123,7 +121,7 @@ function FilterDropdown({ setOpen(!open)} - className={classes.element} + className={classes.gearBtn} > @@ -193,10 +191,10 @@ function FilterDropdown({ toggleLabel(key, itemActive(key)); }} key={key} - className={itemActive(key) ? classes.itemActive : undefined} + selected={itemActive(key)} >
- {itemActive(key) ? : null} + {itemActive(key) && }