Vercel/src/photo/PhotoSmall.tsx
2023-09-18 19:02:36 -05:00

34 lines
701 B
TypeScript

import { Photo, titleForPhoto } from '.';
import ImageSmall from '@/components/ImageSmall';
import Link from 'next/link';
import { cc } from '@/utility/css';
import { pathForPhoto } from '@/site/paths';
export default function PhotoSmall({
photo,
tag,
selected,
}: {
photo: Photo
tag?: string
selected?: boolean
}) {
return (
<Link
href={pathForPhoto(photo, tag)}
className={cc(
'active:brightness-75',
selected && 'brightness-50',
)}
>
<ImageSmall
src={photo.url}
aspectRatio={photo.aspectRatio}
blurData={photo.blurData}
className="w-full"
alt={titleForPhoto(photo)}
/>
</Link>
);
};