diff options
author | Sascha <GlancingMind@outlook.com> | 2021-03-30 13:48:49 +0200 |
---|---|---|
committer | Sascha <GlancingMind@outlook.com> | 2021-04-08 14:57:39 +0200 |
commit | 4517de919ac82d9eb00230003cbe59a24d4c8f2e (patch) | |
tree | 97921874819f0b99d2e27590a26c7b911b464c95 /webui/src | |
parent | 9b2cf1ba32c4760e4febe3ad2a6d7af7661b23d9 (diff) | |
download | git-bug-4517de919ac82d9eb00230003cbe59a24d4c8f2e.tar.gz |
LabelMenu prefer break-on-word-boundary
Diffstat (limited to 'webui/src')
-rw-r--r-- | webui/src/pages/bug/labels/LabelMenu.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/webui/src/pages/bug/labels/LabelMenu.tsx b/webui/src/pages/bug/labels/LabelMenu.tsx index 3551ecd6..5a70bd8a 100644 --- a/webui/src/pages/bug/labels/LabelMenu.tsx +++ b/webui/src/pages/bug/labels/LabelMenu.tsx @@ -3,7 +3,6 @@ import React, { useEffect, useRef, useState } from 'react'; import { IconButton } from '@material-ui/core'; import Menu from '@material-ui/core/Menu'; import MenuItem from '@material-ui/core/MenuItem'; -import { SvgIconProps } from '@material-ui/core/SvgIcon'; import TextField from '@material-ui/core/TextField'; import { makeStyles, withStyles } from '@material-ui/core/styles'; import { darken } from '@material-ui/core/styles/colorManipulator'; @@ -25,7 +24,6 @@ type DropdownTuple = [string, string, Color]; type FilterDropdownProps = { children: React.ReactNode; dropdown: DropdownTuple[]; - icon?: React.ComponentType<SvgIconProps>; hasFilter?: boolean; itemActive: (key: string) => boolean; onClose: () => void; @@ -62,13 +60,13 @@ const useStyles = makeStyles((theme) => ({ background: 'none', border: 'none', }, + menu: { + witdh: 'auto', + }, itemActive: { fontWeight: 600, color: theme.palette.text.primary, }, - icon: { - paddingRight: theme.spacing(0.5), - }, labelcolor: { width: '15px', height: '15px', @@ -102,7 +100,6 @@ const createStyle = (color: Color) => ({ function FilterDropdown({ children, dropdown, - icon: Icon, hasFilter, itemActive, onClose, @@ -133,6 +130,7 @@ function FilterDropdown({ </div> <Menu + className={classes.menu} getContentAnchorEl={null} ref={searchRef} anchorOrigin={{ @@ -190,7 +188,7 @@ function FilterDropdown({ .filter((d) => d[1].toLowerCase().includes(filter.toLowerCase())) .map(([key, value, color]) => ( <MenuItem - style={{ whiteSpace: 'normal', wordBreak: 'break-all' }} + style={{ whiteSpace: 'normal', wordBreak: 'break-word' }} onClick={() => { toggleLabel(key, itemActive(key)); }} |