Vercel/src/photo/StaggeredOgPhotos.tsx
Sam Becker d2e62a9091
Improve tooltip segues (#272)
* Update GH issue template

* Create custom tooltip display engine

* Fix tooltip cleanup behavior

* Make tooltip position size-aware

* Refine tooltip og positioning

* Refine og tooltip behavior

* Refine og image loading behavior
2025-06-22 15:03:18 -05:00

28 lines
607 B
TypeScript

'use client';
import { Photo } from '@/photo';
import PhotoOGTile from './PhotoOGTile';
export default function StaggeredOgPhotos({
photos,
onLastPhotoVisible,
}: {
photos: Photo[]
maxConcurrency?: number
onLastPhotoVisible?: () => void
}) {
return (
<div className="grid gap-3 grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
{photos.map((photo, index) =>
<PhotoOGTile
key={photo.id}
photo={photo}
onVisible={index === photos.length - 1
? onLastPhotoVisible
: undefined}
riseOnHover
/>)}
</div>
);
};