Unverified Commit 104d2ec0 authored by mostapko's avatar mostapko Committed by GitHub

feat(ui): allow navigating between images with arrows in preview dialog (#5669)

parent 664b8c56
......@@ -27,6 +27,12 @@ function PreviewImageDialog({ open, onOpenChange, imgUrls, initialIndex = 0 }: P
case "Escape":
onOpenChange(false);
break;
case "ArrowRight":
setCurrentIndex((prev) => Math.min(prev + 1, imgUrls.length - 1));
break;
case "ArrowLeft":
setCurrentIndex((prev) => Math.max(prev - 1, 0));
break;
default:
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment