fix(extra) : show text colors and catalog items
CI / Verify (push) Successful in 1m4s
CI / Build immutable images and deploy (push) Successful in 2m4s

This commit is contained in:
2026-09-05 13:09:55 +07:00 Unverified
parent a4ecdf4fff
commit 86882dc338
6 changed files with 91 additions and 7 deletions
+12 -3
View File
@@ -1,7 +1,7 @@
import Image from "next/image";
import Link from "next/link";
import { ArrowUpRightIcon, ChevronLeftIcon } from "lucide-react";
import type { ReactNode } from "react";
import type { CSSProperties, ReactNode } from "react";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
@@ -1180,7 +1180,16 @@ function ExtraSectionContent({
<Card
key={row.id}
className="overflow-hidden py-0"
style={row.backgroundColor ? { backgroundColor: row.backgroundColor } : undefined}
style={
{
backgroundColor: row.backgroundColor ?? undefined,
color: row.textColor ?? undefined,
"--tw-prose-body": row.textColor ?? undefined,
"--tw-prose-bold": row.textColor ?? undefined,
"--tw-prose-headings": row.textColor ?? undefined,
"--tw-prose-links": row.textColor ?? undefined,
} as CSSProperties
}
>
{row.imageUrl ? (
<div
@@ -1219,7 +1228,7 @@ function ExtraSectionContent({
) : null}
<CardHeader className="pt-5">
<CardTitle>{row.heading}</CardTitle>
<CardDescription>
<CardDescription style={{ color: row.textColor ?? undefined }}>
<RichTextContent html={normalizeExtraRichText(row.body, row.highlights)} />
</CardDescription>
{row.percent ? <Badge>{metric(row.percent)}</Badge> : null}