Merged in feat/SW-1521-image-gallery-lightbox (pull request #1226)
Feat/SW-1521 image gallery lightbox * feat(SW-1453): added city listing component * feat(SW-1521): added more generic types to ImageGallery and Lightbox components * feat(SW-1521): added lightbox functionality for top images * feat(SW-1521): added support for setting activeIndex on open inside Lightbox Approved-by: Fredrik Thorsson Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
import type { ApiImage } from "@/types/hotel"
|
||||
|
||||
export type PreviewImagesProps = {
|
||||
images: GalleryImage[]
|
||||
images: ApiImage[]
|
||||
hotelName: string
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
import type { ApiImage } from "@/types/hotel"
|
||||
|
||||
export type ImageGalleryProps = { images?: GalleryImage[]; title: string }
|
||||
export type ImageGalleryProps = { images?: ApiImage[]; title: string }
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
export interface GalleryImage {
|
||||
src: string
|
||||
alt: string
|
||||
caption?: string | null
|
||||
smallSrc?: string | null
|
||||
}
|
||||
|
||||
export type ImageGalleryProps = {
|
||||
images?: GalleryImage[]
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { GalleryImage } from "@/types/hotel"
|
||||
import type { GalleryImage } from "../imageGallery"
|
||||
|
||||
export interface LightboxProps {
|
||||
images: GalleryImage[]
|
||||
dialogTitle: string /* Accessible title for dialog screen readers */
|
||||
onClose: () => void
|
||||
isOpen: boolean
|
||||
activeIndex?: number
|
||||
}
|
||||
|
||||
export interface GalleryProps {
|
||||
|
||||
Reference in New Issue
Block a user