Skip to documentation
Design system / Sources & standards
Current repository source
quiet-note.tsx
src/components/editorial/quiet-note.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";
/** Molecule: named non-live guidance, not an assertive alert. */
export function QuietNote({
title,
children,
className,
...props
}: Omit<ComponentProps<"aside">, "title"> & { title: string }) {
return (
<aside
{...props}
role="note"
aria-label={props["aria-label"] ?? title}
data-slot="quiet-note"
className={cn("space-y-3 border-l-2 pl-5", className)}
>
<Text className="font-semibold">{title}</Text>
<div className="space-y-3 text-text-muted">{children}</div>
</aside>
);
}
/** Native disclosure: no new client state or simulated dialog. */
export function RuledDisclosure({
summary,
children,
className,
...props
}: Omit<ComponentProps<"details">, "children"> & {
summary: ReactNode;
children: ReactNode;
}) {
return (
<details
{...props}
data-slot="ruled-disclosure"
className={cn("border-y py-4", className)}
>
<summary className="cursor-pointer text-body font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
{summary}
</summary>
<div className="space-y-3 pt-4">{children}</div>
</details>
);
}
All sources and standards