I am trying to make a page responsive but, I am not able to make an image responsive as it is getting off the grid container in material UI. Is there a way I can make the image responsive? I am trying to add the image in Grid container, Still, it is showing the same.
import React from "react";
import "./styles.css";
import {
Typography,
Container,
Grid,
Button,
CssBaseline
} from "@material-ui/core";
import useStyles from "./styles";
import Pic from "../../Assets/Images/manOnTable.svg";
const Home = props => {
const classes = useStyles;
return (
<React.Fragment>
<CssBaseline />
<Grid container className={classes.root} style={{ height: "auto" }}>
<Grid container sm={6} xs={12}>
<Grid container style={{ padding: "20%" }}>
<Grid item sm={12} xs={12}>
<Typography variant="h3" color="textPrimary" gutterBottom>
Hello, there.
</Typography>
<Typography variant="h5" paragraph>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
</Typography>
<Button
variant="contained"
color="primary"
target="_blank"
href="https://www.google.com/"
disableElevation
>
Resume
</Button>
</Grid>
</Grid>
</Grid>
<Grid container sm={6} xs={12}>
<Grid container style={{ padding: "20%" }}>
<Grid item sm={12} xs={12}>
<img src={Pic} style={{ height: "50vh", width: "50vh" }} />
</Grid>
</Grid>
</Grid>
</Grid>
</React.Fragment>
);
};
export default Home;
