aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/components/BackToListButton.tsx
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-03-21 21:31:14 +0100
committerGitHub <noreply@github.com>2021-03-21 21:31:14 +0100
commit52df5a1f1199d085b2bb10fb7ed5599dcb8307c4 (patch)
tree031a10e135ceb60c623aca994db9c4c701b7ef66 /webui/src/components/BackToListButton.tsx
parent6744cddaa6ed25b9f2c0c61ef9df1823b5e74e6e (diff)
parentaeb26d0e84b14a44ed52e2fd158b01310e295e45 (diff)
downloadgit-bug-52df5a1f1199d085b2bb10fb7ed5599dcb8307c4.tar.gz
Merge pull request #600 from GlancingMind/upstream-improve-navigation
WebUI: Improve navigation
Diffstat (limited to 'webui/src/components/BackToListButton.tsx')
-rw-r--r--webui/src/components/BackToListButton.tsx36
1 files changed, 36 insertions, 0 deletions
diff --git a/webui/src/components/BackToListButton.tsx b/webui/src/components/BackToListButton.tsx
new file mode 100644
index 00000000..7ca53ad0
--- /dev/null
+++ b/webui/src/components/BackToListButton.tsx
@@ -0,0 +1,36 @@
+import React from 'react';
+
+import Button from '@material-ui/core/Button';
+import { makeStyles } from '@material-ui/core/styles';
+import ArrowBackIcon from '@material-ui/icons/ArrowBack';
+
+const useStyles = makeStyles((theme) => ({
+ backButton: {
+ position: 'sticky',
+ top: '80px',
+ backgroundColor: theme.palette.primary.dark,
+ color: theme.palette.primary.contrastText,
+ '&:hover': {
+ backgroundColor: theme.palette.primary.main,
+ color: theme.palette.primary.contrastText,
+ },
+ },
+}));
+
+function BackToListButton() {
+ const classes = useStyles();
+
+ return (
+ <Button
+ variant="contained"
+ className={classes.backButton}
+ aria-label="back to issue list"
+ href="/"
+ >
+ <ArrowBackIcon />
+ Back to List
+ </Button>
+ );
+}
+
+export default BackToListButton;