14 lines
389 B
TypeScript
14 lines
389 B
TypeScript
import type { Rule } from "@proscenium/playbill";
|
|
import { renderMarkdown } from "#lib";
|
|
import { Section } from "./base/section";
|
|
|
|
export async function RuleSection(rule: Rule): Promise<string> {
|
|
const renderedMarkdown = await renderMarkdown(rule.description);
|
|
|
|
return Section({
|
|
title: rule.name,
|
|
componentId: rule.id,
|
|
content: renderedMarkdown,
|
|
type: "rule",
|
|
});
|
|
}
|