23 lines
597 B
TypeScript
23 lines
597 B
TypeScript
import React from 'react'
|
|
import { cn } from '../lib/utils'
|
|
|
|
interface ImageGalleryProps {
|
|
images: { uri?: string }[]
|
|
className?: string
|
|
}
|
|
|
|
export function ImageGallery({ images, className }: ImageGalleryProps) {
|
|
return (
|
|
<div className={cn('grid grid-cols-3 gap-2', className)}>
|
|
{images.map((image, index) => (
|
|
<div key={index} className="aspect-square overflow-hidden rounded-lg">
|
|
<img
|
|
src={image.uri}
|
|
alt={`Gallery ${index + 1}`}
|
|
className="h-full w-full object-cover"
|
|
/>
|
|
</div>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|