Render content of Text With Image component

This commit is contained in:
itsfinniii
2026-03-20 21:14:21 +01:00
parent 94aa8c356e
commit 266e5d1b35

View File

@@ -1,4 +1,5 @@
---
import { markdownToHtml } from '@/lib/markdown';
import { Image } from 'astro:assets';
interface Props {
@@ -14,11 +15,11 @@ const imageSize = () => {
}
---
<div id={`textwithimage-${textWithImage.id}`} class={`flex ${textWithImage.imageSide === "right" ? "flex-row" : "flex-row-reverse"} justify-between items-center py-20 px-12 container mx-auto gap-y-8 gap-x-18`}>
<div id={`textwithimage-${textWithImage.id}`} class={`flex ${textWithImage.imageSide === "right" ? "flex-row" : "flex-row-reverse"} justify-between items-center py-12 px-12 container mx-auto gap-y-8 gap-x-18`}>
<div class="flex flex-col gap-2.5 w-[50%]">
<h2 class="text-5xl font-bold">{textWithImage.title}</h2>
{ textWithImage.text !== null && (
<div>{textWithImage.text}</div>
<div set:html={markdownToHtml(textWithImage.text)}></div>
) }
</div>
<div class="w-[50%]">