chore(SW-3145): Move Caption to design-system * Move Caption to design-system * Mark Caption as deprecated Approved-by: Linus Flood Approved-by: Joakim Jäderberg
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import Caption from "@scandic-hotels/design-system/Caption"
|
|
|
|
import Image from "../Image"
|
|
|
|
import styles from "./imageContainer.module.css"
|
|
|
|
import type { ImageContainerProps } from "@/types/components/imageContainer"
|
|
|
|
export default function ImageContainer({
|
|
leftImage,
|
|
rightImage,
|
|
}: ImageContainerProps) {
|
|
return (
|
|
<section className={styles.container}>
|
|
<article>
|
|
<Image
|
|
className={styles.image}
|
|
src={leftImage.url}
|
|
height={365}
|
|
width={600}
|
|
alt={leftImage.meta.alt || leftImage.title}
|
|
focalPoint={leftImage.focalPoint}
|
|
/>
|
|
<Caption>{leftImage.meta.caption}</Caption>
|
|
</article>
|
|
<article>
|
|
<Image
|
|
className={styles.image}
|
|
src={rightImage.url}
|
|
height={365}
|
|
width={600}
|
|
alt={rightImage.meta.alt || rightImage.title}
|
|
focalPoint={rightImage.focalPoint}
|
|
/>
|
|
<Caption>{leftImage.meta.caption}</Caption>
|
|
</article>
|
|
</section>
|
|
)
|
|
}
|