import type { ReactNode } from "react"; import { cn } from "./cn"; type Tone = "neutral" | "brand" | "accent" | "success" | "warn" | "danger"; const tones: Record = { neutral: "bg-ink-800 text-slate-400", brand: "bg-brand/15 text-brand-400", accent: "bg-accent/15 text-accent-400", success: "bg-success/15 text-success", warn: "bg-warn/15 text-warn", danger: "bg-danger/15 text-danger", }; export function Badge({ tone = "neutral", className, children }: { tone?: Tone; className?: string; children: ReactNode }) { return ( {children} ); } // Dot 状态小圆点(可脉冲)。 export function Dot({ tone = "neutral", pulse }: { tone?: Tone | "running"; pulse?: boolean }) { const color = tone === "success" ? "bg-success" : tone === "danger" ? "bg-danger" : tone === "warn" ? "bg-warn" : tone === "running" || tone === "accent" ? "bg-accent" : tone === "brand" ? "bg-brand" : "bg-slate-600"; return ; }