diff --git a/src/components/Practice/Mechanics3.jsx b/src/components/Practice/Mechanics3.jsx index 7d9692cb..c29a6c1a 100644 --- a/src/components/Practice/Mechanics3.jsx +++ b/src/components/Practice/Mechanics3.jsx @@ -15,6 +15,9 @@ import correctSound from "../../assets/audio/correct.wav"; import wrongSound from "../../assets/audio/wrong.wav"; import removeSound from "../../assets/audio/remove.wav"; import VoiceAnalyser from "../../utils/VoiceAnalyser"; +import { Modal } from "@mui/material"; +import ZoomInIcon from "@mui/icons-material/ZoomIn"; +import CloseIcon from "@mui/icons-material/Close"; const Mechanics2 = ({ page, @@ -54,7 +57,7 @@ const Mechanics2 = ({ }) => { const [words, setWords] = useState([]); const [sentences, setSentences] = useState([]); - + const [zoomOpen, setZoomOpen] = useState(false); const [selectedWord, setSelectedWord] = useState(""); // const [loading, setLoading] = useState(false); const [shake, setShake] = useState(false); @@ -255,17 +258,96 @@ const Mechanics2 = ({ }, }} > - {image && ( - + {image && ( + + )} + + {/* Subtle gradient overlay across the top */} + - )} + > + {/* Zoom icon positioned in the top-left corner */} + setZoomOpen(true)} + sx={{ color: "white", fontSize: "22px", cursor: "pointer" }} + /> + + + setZoomOpen(false)} + sx={{ + display: "flex", + alignItems: "center", + justifyContent: "center", + }} + > + + {/* Subtle gradient overlay at the top of the zoomed image */} + + {/* Close icon positioned within the gradient overlay */} + setZoomOpen(false)} + sx={{ + color: "white", + fontSize: "24px", + cursor: "pointer", + backgroundColor: "rgba(0, 0, 0, 0.5)", + borderRadius: "50%", + padding: "4px", + }} + /> + + + Zoomed content + +