Skip to documentation
Design system / Sources & standards
Current repository source
guidanceCard.tsx
src/components/ui/guidanceCard.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 { ReactNode } from "react";
import { cn } from "@/lib/utils";
import { Card, CardContent } from "./card";
import { Text } from "./text";
type GuidanceCardProps = {
title: string;
icon?: ReactNode;
children: ReactNode;
className?: string;
};
/** Static, in-flow guidance. The caller owns the message and when it appears. */
export function GuidanceCard({ title, icon, children, className }: GuidanceCardProps) {
return (
<Card
role="note"
aria-label={title}
elevation="flat"
className={cn("gap-0 bg-surface-raised py-0", className)}
>
<CardContent className="flex items-start gap-4 py-6 sm:gap-6 sm:px-8">
{icon != null && (
<span
className="flex size-10 shrink-0 items-center justify-center rounded-lg border bg-card text-foreground"
aria-hidden="true"
>
{icon}
</span>
)}
<div className="min-w-0 space-y-2">
<Text className="font-semibold">{title}</Text>
<Text as="div" variant="supporting" rhythm="loose" className="text-text-muted">
{children}
</Text>
</div>
</CardContent>
</Card>
);
}
All sources and standards