Use carousel to display images (fix dimensions)

This commit is contained in:
Sebastien Castiel
2024-01-28 23:41:18 -05:00
parent 9876d7045f
commit 091cd02c06

View File

@@ -171,7 +171,7 @@ export function DocumentThumbnail({
{documents.map((document, index) => ( {documents.map((document, index) => (
<CarouselItem key={index}> <CarouselItem key={index}>
<Image <Image
className="object-contain w-[calc(100vw-32px)] h-[calc(100dvh-32px-40px-16px)] sm:w-[calc(100vw-32px-32px)] sm:h-[calc(100dvh-32px-40px-16px-32px)]" className="object-contain w-[calc(100vw-32px)] h-[calc(100dvh-32px-40px-16px-48px)] sm:w-[calc(100vw-32px-32px)] sm:h-[calc(100dvh-32px-40px-16px-32px-48px)]"
src={document.url} src={document.url}
width={document.width} width={document.width}
height={document.height} height={document.height}
@@ -180,8 +180,8 @@ export function DocumentThumbnail({
</CarouselItem> </CarouselItem>
))} ))}
</CarouselContent> </CarouselContent>
<CarouselPrevious className="left-0 top-auto bottom-0" /> <CarouselPrevious className="left-0 top-auto -bottom-16" />
<CarouselNext className="right-0 top-auto bottom-0" /> <CarouselNext className="right-0 top-auto -bottom-16" />
</Carousel> </Carousel>
</div> </div>
</DialogContent> </DialogContent>