"use client"; import { formatKeyCombo } from "@/lib/keyParser"; import { cn } from "@/lib/utils"; interface ShortcutBadgeProps { keys: string[]; className?: string; } /** * Renders the first key combo for a command as a series of elements. * E.g. "mod+shift+k" → [⌘] [⇧] [K] */ export function ShortcutBadge({ keys, className }: ShortcutBadgeProps) { if (keys.length === 0) return null; const parts = formatKeyCombo(keys[0]); return ( {parts.map((part, i) => ( {part} ))} ); }