aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/tag/ImageTag.js
blob: b0f0c1c847ed771132f4696314d57e48f1dfa256 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React from 'react';
import { makeStyles } from '@material-ui/styles';

const useStyles = makeStyles({
  tag: {
    maxWidth: '100%',
  },
});

const ImageTag = ({ alt, ...props }) => {
  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;