aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/components/Content/ImageTag.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/components/Content/ImageTag.tsx')
-rw-r--r--webui/src/components/Content/ImageTag.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/webui/src/components/Content/ImageTag.tsx b/webui/src/components/Content/ImageTag.tsx
new file mode 100644
index 00000000..70ee1bc0
--- /dev/null
+++ b/webui/src/components/Content/ImageTag.tsx
@@ -0,0 +1,23 @@
+import React from 'react';
+
+import { makeStyles } from '@material-ui/styles';
+
+const useStyles = makeStyles({
+ tag: {
+ maxWidth: '100%',
+ },
+});
+
+const ImageTag = ({
+ alt,
+ ...props
+}: React.ImgHTMLAttributes<HTMLImageElement>) => {
+ const classes = useStyles();
+ return (
+ <a href={props.src} target="_blank" rel="noopener noreferrer nofollow">
+ <img className={classes.tag} alt={alt} {...props} />
+ </a>
+ );
+};
+
+export default ImageTag;