fix: add imageContainer reference in rte
This commit is contained in:
23
components/ImageContainer/imageContainer.module.css
Normal file
23
components/ImageContainer/imageContainer.module.css
Normal file
@@ -0,0 +1,23 @@
|
||||
.container {
|
||||
display: grid;
|
||||
gap: var(--Spacing-x2);
|
||||
width: 100%;
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
|
||||
.image {
|
||||
max-width: 100%;
|
||||
height: 365px;
|
||||
object-fit: cover;
|
||||
border-radius: var(--Corner-radius-Medium);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.container {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.image {
|
||||
margin: var(--Spacing-x1) var(--Spacing-x0);
|
||||
}
|
||||
}
|
||||
36
components/ImageContainer/index.tsx
Normal file
36
components/ImageContainer/index.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import Image from "../Image"
|
||||
import Caption from "../TempDesignSystem/Text/Caption"
|
||||
|
||||
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}
|
||||
/>
|
||||
<Caption>{leftImage.meta.caption}</Caption>
|
||||
</article>
|
||||
<article>
|
||||
<Image
|
||||
className={styles.image}
|
||||
src={rightImage.url}
|
||||
height={365}
|
||||
width={600}
|
||||
alt={rightImage.meta.alt || rightImage.title}
|
||||
/>
|
||||
<Caption>{leftImage.meta.caption}</Caption>
|
||||
</article>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user