This commit is contained in:
2026-06-17 11:19:08 +08:00
parent 4c56c7cb04
commit 50312c4c6c
10 changed files with 1933 additions and 4 deletions

View File

@@ -0,0 +1,42 @@
import { site } from "@/content/site";
type Report = (typeof site.intelligentReport.reports)[number];
type SkillExampleContentProps = {
report: Report;
};
/**
* 示例报告内容渲染 — 卡片弹窗与详情页「示例报告」tab 共用同一套结构与样式。
* 外层overlay/dialog/footer由各自调用方自行包裹。
*/
export function SkillExampleContent({ report }: SkillExampleContentProps) {
return (
<div className="report-example-content">
<header className="report-example-content__header flex flex-col gap-3">
<p className="type-mono-caps-label text-body">{report.audience}</p>
<h3 className="report-example-content__title type-display-lg text-balance text-ink">
{report.example.title}
</h3>
<p className="type-mono-caption text-body">{report.example.meta}</p>
</header>
<div className="report-example-content__body">
{report.example.sections.map((sec) => (
<section key={sec.heading} className="report-example-section">
<h4 className="type-caption-strong text-ink">{sec.heading}</h4>
{"body" in sec && sec.body ? (
<p className="type-body-md text-body">{sec.body}</p>
) : null}
{"bullets" in sec && sec.bullets ? (
<ul className="report-example-list">
{sec.bullets.map((item) => (
<li key={item}>{item}</li>
))}
</ul>
) : null}
</section>
))}
</div>
</div>
);
}