aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/components/Content/ImageTag.tsx
blob: f6e7d5ba6cf1ae9535c81e60ece3ad1c45e2aee2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { makeStyles } from '@mui/styles';
import * as React from 'react';

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

const ImageTag: React.FC<React.ImgHTMLAttributes<HTMLImageElement>> = ({
  alt,
  ...props
}) => {
  const classes = useStyles();
  return (
    <>
      <a href={props.src} target="_blank" rel="noopener noreferrer nofollow">
        <img className={classes.tag} alt={alt} {...props} />
      </a>
      <br />
    </>
  );
};

export default ImageTag;