fix(SW-2055): Surrounded ul inside JsonToHtml with a typography component

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-05-19 09:19:55 +00:00
parent 7fe25f7eca
commit 636b92aac5

View File

@@ -1,4 +1,5 @@
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import { Typography } from "@scandic-hotels/design-system/Typography"
import Image from "@/components/Image"
import Link from "@/components/TempDesignSystem/Link"
@@ -625,20 +626,21 @@ export const renderOptions: RenderOptions = {
}
return (
<ul
key={node.uid}
{...props}
className={`${styles.ul} ${compatibleClassName}`}
style={
numberOfRows
? {
gridTemplateRows: `repeat(${numberOfRows}, auto)`,
}
: {}
}
>
{next(node.children, embeds, fullRenderOptions)}
</ul>
<Typography variant="Body/Paragraph/mdRegular" key={node.uid}>
<ul
{...props}
className={`${styles.ul} ${compatibleClassName}`}
style={
numberOfRows
? {
gridTemplateRows: `repeat(${numberOfRows}, auto)`,
}
: {}
}
>
{next(node.children, embeds, fullRenderOptions)}
</ul>
</Typography>
)
},