feat(SW-1493): Revised SAS comparison block * Base of new TierDetails for SAS tier comparison * Add backgrounds and content to TierDetails * Implement new cms schema for SasTierComparison * Override gap in jsontohtml styling to 0 * Add animations to comparison details * Redesign again * Update content model to new design * Add border to bottom item in tier match list * Wrap interpolate-size in @supports to be safe * Merge branch 'master' into feat/sw-1493-revised-comparison-block Approved-by: Joakim Jäderberg
24 lines
544 B
TypeScript
24 lines
544 B
TypeScript
import { cx } from "class-variance-authority"
|
|
|
|
import { nodesToHtml } from "./utils"
|
|
|
|
import styles from "./jsontohtml.module.css"
|
|
|
|
import type { JsonToHtmlProps } from "@/types/transitionTypes/jsontohtml"
|
|
|
|
export default function JsonToHtml({
|
|
embeds,
|
|
nodes,
|
|
renderOptions = {},
|
|
className,
|
|
}: JsonToHtmlProps) {
|
|
if (!Array.isArray(nodes) || !nodes.length) {
|
|
return null
|
|
}
|
|
return (
|
|
<section className={cx(styles.container, className)}>
|
|
{nodesToHtml(nodes, embeds, renderOptions).filter(Boolean)}
|
|
</section>
|
|
)
|
|
}
|