Gateprep / frontend /src /components /test /OptionImage.jsx
banu4prasad's picture
minor design fixes
9118313
Raw History Blame Contribute Delete
453 Bytes
export default function OptionImage({ src, letter }) {
if (!src) return null
return (
<img
src={src}
alt={`option ${letter}`}
width={320}
height={137}
loading="lazy"
decoding="async"
className="mt-2 w-full max-w-sm max-h-32 object-contain rounded cursor-pointer bg-muted aspect-[21/9]"
onClick={(event) => {
event.stopPropagation()
window.open(src, '_blank')
}}
/>
)
}