Feat/SW-689 image gallery sizes * feat(SW-689): initial gallery changes * feat(SW-689): remove console.log * feat(SW-689): remove unneccessary code * feat(SW-689): change sizes * feat(SW-689): change size * feat(SW-689): add design for ipad for fullview * feat(SW-689): fix import type * feat(SW-689): fix tripAdvisor placement * feat(SW-689): fix image gallery type * feat(SW-689): fix check gallery length Approved-by: Christian Andolf Approved-by: Matilda Landström
29 lines
915 B
TypeScript
29 lines
915 B
TypeScript
import { GalleryIcon } from "@/components/Icons"
|
|
import Image from "@/components/Image"
|
|
import Lightbox from "@/components/Lightbox"
|
|
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
|
|
|
import styles from "./imageGallery.module.css"
|
|
|
|
import type { ImageGalleryProps } from "@/types/components/hotelReservation/selectRate/imageGallery"
|
|
|
|
export default function ImageGallery({ images, title }: ImageGalleryProps) {
|
|
return (
|
|
<Lightbox images={images} dialogTitle={title}>
|
|
<div className={styles.triggerArea} id="lightboxTrigger">
|
|
<Image
|
|
src={images[0].imageSizes.medium}
|
|
alt={images[0].metaData.altText}
|
|
fill
|
|
/>
|
|
<div className={styles.galleryIcon}>
|
|
<GalleryIcon color="white" />
|
|
<Footnote color="white" type="label">
|
|
{images.length}
|
|
</Footnote>
|
|
</div>
|
|
</div>
|
|
</Lightbox>
|
|
)
|
|
}
|