2026-03-07 02:50:01 +05:30
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
|
|
|
|
|
interface ShortcutKbdProps {
|
|
|
|
|
keys: string[];
|
|
|
|
|
className?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ShortcutKbd({ keys, className }: ShortcutKbdProps) {
|
|
|
|
|
if (keys.length === 0) return null;
|
|
|
|
|
|
|
|
|
|
return (
|
2026-03-08 17:10:24 +05:30
|
|
|
<span className={cn("ml-2 inline-flex items-center gap-0.5 text-white/85", className)}>
|
2026-03-07 02:50:01 +05:30
|
|
|
{keys.map((key) => (
|
|
|
|
|
<kbd
|
|
|
|
|
key={key}
|
2026-03-08 17:10:24 +05:30
|
|
|
className="inline-flex size-[18px] items-center justify-center rounded-[4px] bg-white/[0.18] font-sans text-[11px] leading-none"
|
2026-03-07 02:50:01 +05:30
|
|
|
>
|
|
|
|
|
{key}
|
|
|
|
|
</kbd>
|
|
|
|
|
))}
|
|
|
|
|
</span>
|
|
|
|
|
);
|
|
|
|
|
}
|