aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/tag/ImageTag.js
diff options
context:
space:
mode:
authorludovicm67 <ludovicmuller1@gmail.com>2020-01-23 21:50:20 +0100
committerludovicm67 <ludovicmuller1@gmail.com>2020-01-23 21:50:20 +0100
commit3413ee448a79686381624a414b18debd09120b9e (patch)
treeca5e59aa39fa8b6a11ba22007291861d8007ee30 /webui/src/tag/ImageTag.js
parente08ecf1a7f8d93b584c0c5130e4333d6621a4c52 (diff)
downloadgit-bug-3413ee448a79686381624a414b18debd09120b9e.tar.gz
webui: open image in a new tab on click
Diffstat (limited to 'webui/src/tag/ImageTag.js')
-rw-r--r--webui/src/tag/ImageTag.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/webui/src/tag/ImageTag.js b/webui/src/tag/ImageTag.js
index aea65e9d..b0f0c1c8 100644
--- a/webui/src/tag/ImageTag.js
+++ b/webui/src/tag/ImageTag.js
@@ -7,9 +7,13 @@ const useStyles = makeStyles({
},
});
-const ImageTag = (props) => {
+const ImageTag = ({ alt, ...props }) => {
const classes = useStyles();
- return <img className={classes.tag} {...props} />
+ return (
+ <a href={props.src} target="_blank" rel="noopener noreferrer nofollow">
+ <img className={classes.tag} alt={alt} {...props} />
+ </a>
+ );
};
-export default ImageTag; \ No newline at end of file
+export default ImageTag;