Skip to documentation
Design system / Sources & standards
Current repository source
decision-list.tsx
src/components/editorial/decision-list.tsx
This view contains the escaped source read during the deployment build. Code and policy text are unchanged. Markdown is shown as source, not rendered as a document. A new deployment refreshes the content.
import type { ComponentProps, ReactNode } from "react";
import { Text } from "@/components/ui/text";
import { cn } from "@/lib/utils";
export type DecisionItem = {
id: string;
term: ReactNode;
description: ReactNode;
};
/** Molecule: semantic paired explanations, stacking without losing relationships. */
export function DecisionList({
items,
className,
...props
}: Omit<ComponentProps<"dl">, "children"> & {
items: readonly DecisionItem[];
}) {
return (
<dl
{...props}
data-slot="decision-list"
className={cn("divide-y border-y", className)}
>
{items.map((item) => (
<div
key={item.id}
className="grid min-w-0 gap-3 py-5 md:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] md:gap-6"
>
<dt className="min-w-0 break-words text-body font-semibold">
{item.term}
</dt>
<Text
as="dd"
variant="inherit"
rhythm="loose"
className="min-w-0 break-words text-text-muted"
>
{item.description}
</Text>
</div>
))}
</dl>
);
}
All sources and standards