forked from francoischalifour/medium-zoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
49 lines (41 loc) · 1.18 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React from 'react'
import mediumZoom from 'medium-zoom'
import ImageZoom from './ImageZoom'
function App() {
const zoom = React.useRef(mediumZoom())
return (
<article className="container">
<h1>React demo</h1>
<ImageZoom
src="images/image-1.jpg"
alt="Zoom 1"
zoom={zoom.current}
background="#000"
/>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora
praesentium cupiditate fugit voluptas, rem eligendi, voluptatem
molestias. Doloremque sit voluptatum odio maiores provident consequuntur
accusantium saepe.
</p>
<ImageZoom
src="images/image-2.jpg"
alt="Zoom 2"
zoom={zoom.current}
background="red"
/>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea dolores
quaerat, quis modi nostrum sequi adipisci ratione esse blanditiis error
beatae vel non vero dolor nemo. Animi nemo quisquam ducimus!
</p>
<ImageZoom
src="images/image-3.jpg"
alt="Zoom 3"
zoom={zoom.current}
background="yellow"
/>
</article>
)
}
export default App