feat(SW-3151): Added original to imageSchema and added transform to a more generic image type

Approved-by: Bianca Widstam
Approved-by: Chuma Mcphoy (We Ahead)
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-09-10 08:29:05 +00:00
parent a5790ee454
commit f04fe467da
35 changed files with 182 additions and 201 deletions

View File

@@ -10,8 +10,8 @@ import { Typography } from '../../Typography'
import Image from '../../Image'
import styles from './gallery.module.css'
import { LightboxImage } from '..'
import styles from './gallery.module.css'
type GalleryProps = {
images: LightboxImage[]
@@ -164,7 +164,7 @@ export default function Gallery({
<AnimatePresence initial={false}>
{getThumbImages().map((image, index) => (
<motion.div
key={image.smallSrc || image.src}
key={image.src}
className={styles.thumbnailContainer}
initial={{ opacity: 0, x: 50 }}
animate={{ opacity: 1, x: 0 }}
@@ -179,7 +179,7 @@ export default function Gallery({
})}
>
<Image
src={image.smallSrc || image.src}
src={image.src}
alt={image.alt}
fill
sizes="200px"
@@ -196,7 +196,7 @@ export default function Gallery({
<div className={styles.mobileGallery}>
{images.map((image, index) => (
<motion.div
key={image.smallSrc || image.src}
key={image.src}
className={`${styles.thumbnailContainer} ${index % 3 === 0 ? styles.fullWidthImage : ''}`}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
@@ -211,7 +211,7 @@ export default function Gallery({
}}
>
<Image
src={image.smallSrc || image.src}
src={image.src}
alt={image.alt}
fill
sizes="100vw"