adding side navigator and device icon

This commit is contained in:
Carter 2024-11-13 14:03:05 -06:00
parent ab4fd77471
commit b7d859b083

40
src/common/ImgIcon.tsx Normal file
View file

@ -0,0 +1,40 @@
import { Icon } from "@mui/material";
import { makeStyles } from "@mui/styles";
// import Image from "material-ui-image";
import { Img as Image } from 'react-image';
const useStyles = makeStyles(() => ({
icon: {
textAlign: "center",
margin: "1px"
},
img: {
height: "100%",
width: "auto !important"
}
}));
interface Props {
src?: string;
alt?: string;
style?: any;
}
export function ImgIcon(props: Props) {
const { src, alt, style } = props;
const classes = useStyles();
if (!src) return null;
return (
<Icon className={classes.icon}>
<Image
alt={alt}
className={classes.img}
src={src}
color="transparent"
style={style}
/>
</Icon>
);
}