diff --git a/modules/blox/blox/comparison-table/component.jsx b/modules/blox/blox/comparison-table/component.jsx
index 3d090329..f7dcfdb6 100644
--- a/modules/blox/blox/comparison-table/component.jsx
+++ b/modules/blox/blox/comparison-table/component.jsx
@@ -9,7 +9,11 @@ function renderText(text) {
return String(text)
.replace(/\*\*(.*?)\*\*/g, "$1")
.replace(/\*(.*?)\*/g, "$1")
- .replace(/`(.*?)`/g, (_, code) => `${code}`);
+ .replace(
+ /`(.*?)`/g,
+ (_, code) =>
+ `${code}`,
+ );
}
// Resolve a cell value into one of: {kind: "check"} | {kind: "cross"} | {kind: "partial", note} | {kind: "text", value, emphasis}
@@ -17,31 +21,26 @@ function resolveCell(raw) {
if (raw === true) return {kind: "check"};
if (raw === false || raw == null || raw === "") return {kind: "cross"};
if (typeof raw === "object") {
- if (raw.value === true) return {kind: "check", note: raw.note};
+ if (raw.value === true) return {kind: "check", note: raw.note};
if (raw.value === false) return {kind: "cross", note: raw.note};
if (raw.value === "partial" || raw.partial) return {kind: "partial", note: raw.note ?? raw.value};
return {kind: "text", value: raw.value ?? "", emphasis: raw.emphasis ?? false, note: raw.note};
}
const s = String(raw).trim();
- if (s === "true" || s === "yes" || s === "✓") return {kind: "check"};
- if (s === "false" || s === "no" || s === "✗" || s === "—") return {kind: "cross"};
+ if (s === "true" || s === "yes" || s === "✓") return {kind: "check"};
+ if (s === "false" || s === "no" || s === "✗" || s === "—") return {kind: "cross"};
if (s === "partial" || s === "limited") return {kind: "partial", note: s};
return {kind: "text", value: s};
}
function CellContent({cell, isHighlighted}) {
- const positiveColor = isHighlighted
- ? "text-primary-600 dark:text-primary-400"
- : "text-green-500 dark:text-green-400";
- const partialColor = "text-amber-500 dark:text-amber-400";
+ const positiveColor = isHighlighted ? "text-primary-600 dark:text-primary-400" : "text-green-500 dark:text-green-400";
+ const partialColor = "text-amber-500 dark:text-amber-400";
if (cell.kind === "check") {
return (
-
+
{cell.note && {cell.note}}
);
@@ -49,10 +48,7 @@ function CellContent({cell, isHighlighted}) {
if (cell.kind === "cross") {
return (
-
+
{cell.note && {cell.note}}
);
@@ -60,10 +56,7 @@ function CellContent({cell, isHighlighted}) {
if (cell.kind === "partial") {
return (
-
+
{cell.note && {cell.note}}
);
@@ -87,14 +80,13 @@ function DesktopTable({competitors, rows, cta, icon_svgs, rowStriping = false})
// Column widths: feature label column gets 1.5× a competitor column for readable row labels
const colWidthPct = 100 / (competitors.length + 1.5);
const labelColPct = colWidthPct * 1.5;
- const colLeftPct = labelColPct + colWidthPct * (highlightIdx >= 0 ? highlightIdx : 0);
+ const colLeftPct = labelColPct + colWidthPct * (highlightIdx >= 0 ? highlightIdx : 0);
return (
// pt-5 reserves vertical space above the table for the ring-tab badge to sit on the column's top edge
{/* Card — overflow-visible so the highlight ring can extend above its top edge */}
-
{/* Highlight column FILL — paints BEFORE table, behind cells. Cell content sits on top. */}
{highlightIdx >= 0 && (
+
{highlighted.badge}
@@ -126,11 +115,7 @@ function DesktopTable({competitors, rows, cta, icon_svgs, rowStriping = false})
{c.name}
- {c.tagline && (
-
- {c.tagline}
-
- )}
+ {c.tagline &&
{c.tagline}
}
{/* Competitor badges render inline (highlighted column uses the ring-tab instead) */}
{c.badge && !isYou && (
@@ -153,7 +138,10 @@ function DesktopTable({competitors, rows, cta, icon_svgs, rowStriping = false})
if (isCategory) {
return (
- |
+ |
{row.feature}
|
@@ -175,9 +163,7 @@ function DesktopTable({competitors, rows, cta, icon_svgs, rowStriping = false})
|
{row.feature}
- {row.note && (
- {row.note}
- )}
+ {row.note && {row.note} }
|
{competitors.map((_, ci) => (
@@ -225,9 +211,7 @@ function DesktopTable({competitors, rows, cta, icon_svgs, rowStriping = false})
function MobileCards({competitors, rows, cta, icon_svgs}) {
const highlightIdx = competitors.findIndex((c) => c.highlight);
- const ordered = highlightIdx >= 0
- ? [competitors[highlightIdx], ...competitors.filter((_, i) => i !== highlightIdx)]
- : competitors;
+ const ordered = highlightIdx >= 0 ? [competitors[highlightIdx], ...competitors.filter((_, i) => i !== highlightIdx)] : competitors;
const ctaIconSvg = cta?.icon ? (icon_svgs?.[cta.icon] ?? null) : null;
const isExtCta = cta?.url && (cta.url.startsWith("http://") || cta.url.startsWith("https://"));
@@ -244,33 +228,31 @@ function MobileCards({competitors, rows, cta, icon_svgs}) {
>
-
- {c.name}
-
- {c.tagline && (
- {c.tagline}
- )}
+ {c.name}
+ {c.tagline && {c.tagline} }
{c.badge && (
-
+
{c.badge}
)}
- {rows.filter((r) => !r.category).map((row, ri) => (
- -
-
- {row.feature}
- {row.note && (
- {row.note}
- )}
-
-
-
-
-
- ))}
+ {rows
+ .filter((r) => !r.category)
+ .map((row, ri) => (
+ -
+
+ {row.feature}
+ {row.note && {row.note} }
+
+
+
+
+
+ ))}
{isYou && cta?.text && cta?.url && (
@@ -299,30 +281,21 @@ export const ComparisonTableBlock = ({content = {}, design = {}, icon_svgs = {}}
{(title || subtitle || text) && (
- {subtitle && (
-
- {subtitle}
-
- )}
+ {subtitle && {subtitle} }
{title && (
)}
- {text && (
-
- )}
+ {text && }
)}
{competitors.length > 0 && rows.length > 0 && (
<>
-
+
>
)}
|