style image blocks along with body elements

This commit is contained in:
2024-05-20 21:36:18 +02:00
parent adfb4da749
commit 10227ff8e3
5 changed files with 94 additions and 14 deletions

View File

@@ -8,7 +8,9 @@ export const ImageWithTextBlock = ({
block: ImageWithTextBlockType;
}) => {
return (
<div className={styles.imageWithTextBlock}>
<figure
className={`${styles.imageWithTextBlock} ${styles[block.imageFormat]}`}
>
<Image
src={block.image.url}
alt={block.image.alt ?? ""}
@@ -18,8 +20,7 @@ export const ImageWithTextBlock = ({
// height={0}
// sizes="20vw"
/>
<div>{block.imageFormat}</div>
{block.text && <div>{block.text}</div>}
</div>
{block.text && <figcaption>{block.text}</figcaption>}
</figure>
);
};