-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsnapshotGallery.js
41 lines (39 loc) · 1.12 KB
/
snapshotGallery.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
import React from "react";
// import { Carousel } from "react-bootstrap";
const SnapshotGallery = ({ styles, changeHandler, styleIndex }) => {
return (
<div className="snapshot-gallery" id='style-selector-click'>
{styles.map((style, i) => {
if (i === styleIndex) {
return (
<div style={{display: 'inline-block', position: 'relative'}}>
<img
className='snapshots'
src={style.photos[0].thumbnail_url}
alt="no photo :("
id="style"
value={i}
key={i}
onClick={() => changeHandler(i)}
/>
<li className="selected-style-indicator"/>
</div>
);
} else {
return (
<img
className="snapshots"
src={style.photos[0].thumbnail_url}
alt="no photo :("
id="style"
value={i}
key={i}
onClick={() => changeHandler(i)}
/>
);
}
})}
</div>
);
};
export default SnapshotGallery;