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