Last active
March 16, 2017 12:59
-
-
Save 1dolinski/2b2fae324e32f8c3ed69cbcb4cd20916 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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