Created
March 16, 2017 12:55
-
-
Save 1dolinski/c8cc4002b62df0c902f44f3891d54c4f to your computer and use it in GitHub Desktop.
This file contains 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