Skip to content

Commit

Permalink
feat: make current image clickable, closes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdyman committed Oct 19, 2024
1 parent 5744d62 commit 30097c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/ReactImageTurntable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ export const ReactImageTurntable = forwardRef<HTMLDivElement, ReactImageTurntabl
index === 0 ? CLASS_NAME_IMG_PRIMARY : CLASS_NAME_IMG_SECONDARY
}`}
src={src}
alt={`Turntable image ${index + 1}`}
alt={`Turntable ${index + 1} of ${images.length + 1}`}
draggable={false}
onDragStart={handleImgDragStart}
style={{
position: index === 0 ? undefined : 'absolute',
opacity: index === activeImageIndex ? 1 : 0,
pointerEvents: index === activeImageIndex ? undefined : 'none',
left: 0,
top: 0,
right: 0,
Expand Down

0 comments on commit 30097c2

Please sign in to comment.