SPB Git
579 B · 6 lines tsx
1import { cn } from "@/lib/utils";2export function Badge({ children, tone = "neutral", className, title }: { children: React.ReactNode; tone?: "neutral" | "accent" | "ok" | "warn" | "bad" | "info"; className?: string; title?: string }) {3  const tones = { neutral: "chip", accent: "chip chip-accent", ok: "chip border-ok/30 bg-ok/10 text-ok", warn: "chip border-warn/30 bg-warn/10 text-warn", bad: "chip border-bad/30 bg-bad/10 text-bad", info: "chip border-info/30 bg-info/10 text-info" };4  return <span className={cn(tones[tone], className)} title={title}>{children}</span>;5}6
Files · main
Menu

Theme