"use client"; import { ReactNode } from "react"; import { cn } from "@/lib/utils"; interface PanelHeaderProps { icon?: ReactNode; title: string; subtitle?: string; children?: ReactNode; // Toolbar actions slot className?: string; } /** * Rerun-style panel header with icon, title, and optional toolbar. * * Design tokens (from Rerun): * - Title bar height: 24px * - Icon size: 14px (3.5 tailwind units) * - Icon-to-text gap: 4px (gap-1) * - Font size: 12px with -0.15px tracking * - Section header font: 11px uppercase */ export function PanelHeader({ icon, title, subtitle, children, className }: PanelHeaderProps) { return (
{icon && ( // 14px icon (3.5 tailwind units) with 4px gap to text {icon} )} {/* 12px font, medium weight, tight tracking */} {title} {subtitle && ( {subtitle} )}
{children && (
{children}
)}
); }