import type { ReactNode } from 'react'; export interface CardProps { title?: string; /** Right-aligned metadata on the title row: a count, an id, a timestamp. */ meta?: string; children: ReactNode; className?: string; } export function Card({ title, meta, children, className }: CardProps) { const head = title !== undefined || meta !== undefined; return (
{head && (
{title !== undefined &&

{title}

} {meta !== undefined && {meta}}
)}
{children}
); }