aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/bug/Bug.tsx
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-04-12 19:17:26 +0200
committerGitHub <noreply@github.com>2021-04-12 19:17:26 +0200
commit491f0ea9513e8080f6b38885b1a05f47fb56d9dc (patch)
treeed858dde9305130a9fd6a8a32e172f9637531f34 /webui/src/pages/bug/Bug.tsx
parentc71d26d513e4e5e36e6983e05dee4ad28ec664c7 (diff)
parentc37d3d771806f9709c0c9fc77b5bbf8806a2ec23 (diff)
downloadgit-bug-491f0ea9513e8080f6b38885b1a05f47fb56d9dc.tar.gz
Merge pull request #627 from GlancingMind/upstream-set-bug-labels
WebUI: Set bug labels
Diffstat (limited to 'webui/src/pages/bug/Bug.tsx')
-rw-r--r--webui/src/pages/bug/Bug.tsx19
1 files changed, 12 insertions, 7 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx
index 25281f96..b32b0948 100644
--- a/webui/src/pages/bug/Bug.tsx
+++ b/webui/src/pages/bug/Bug.tsx
@@ -9,6 +9,7 @@ import Label from 'src/components/Label';
import { BugFragment } from './Bug.generated';
import CommentForm from './CommentForm';
import TimelineQuery from './TimelineQuery';
+import LabelMenu from './labels/LabelMenu';
/**
* Css in JS Styles
@@ -53,13 +54,15 @@ const useStyles = makeStyles((theme) => ({
listStyle: 'none',
padding: 0,
margin: 0,
+ display: 'flex',
+ flexDirection: 'row',
+ flexWrap: 'wrap',
},
label: {
- marginTop: theme.spacing(1),
- marginBottom: theme.spacing(1),
- '& > *': {
- display: 'block',
- },
+ marginTop: theme.spacing(0.1),
+ marginBottom: theme.spacing(0.1),
+ marginLeft: theme.spacing(0.25),
+ marginRight: theme.spacing(0.25),
},
noLabel: {
...theme.typography.body2,
@@ -94,14 +97,16 @@ function Bug({ bug }: Props) {
</IfLoggedIn>
</div>
<div className={classes.rightSidebar}>
- <span className={classes.rightSidebarTitle}>Labels</span>
+ <span className={classes.rightSidebarTitle}>
+ <LabelMenu bug={bug} />
+ </span>
<ul className={classes.labelList}>
{bug.labels.length === 0 && (
<span className={classes.noLabel}>None yet</span>
)}
{bug.labels.map((l) => (
<li className={classes.label} key={l.name}>
- <Label label={l} key={l.name} />
+ <Label label={l} key={l.name} maxWidth="25ch" />
</li>
))}
</ul>