Skip to content

Instantly share code, notes, and snippets.

@1dolinski
Created March 16, 2017 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1dolinski/c8cc4002b62df0c902f44f3891d54c4f to your computer and use it in GitHub Desktop.
Save 1dolinski/c8cc4002b62df0c902f44f3891d54c4f to your computer and use it in GitHub Desktop.
import React from 'react';
import styled from 'styled-components';
import CursorZoom from 'react-cursor-zoom';
const StyledImageZoom = styled(CursorZoom)`
border: 1px solid black;
`
const ImageZoom = () => {
return (
<StyledImageZoom
image={{
src: "./balloon-xs.jpg",
width: 512,
height: 341
}}
zoomImage={{
src: "./balloon-lg.jpg",
width: 5616,
height: 3744
}}
cursorOffset={{ x: 80, y: -80 }}
/>
);
}
export default ImageZoom;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment