refactor: update ShortcutKbd component styling to adjust key width based on key length

This commit is contained in:
Anish Sarkar 2026-03-08 22:33:07 +05:30
parent 195dbc5fc0
commit ed6ff33933

View file

@ -13,7 +13,10 @@ export function ShortcutKbd({ keys, className }: ShortcutKbdProps) {
{keys.map((key) => (
<kbd
key={key}
className="inline-flex size-[18px] items-center justify-center rounded-[4px] bg-white/[0.18] font-sans text-[11px] leading-none"
className={cn(
"inline-flex h-[18px] items-center justify-center rounded-[4px] bg-white/[0.18] font-sans text-[11px] leading-none",
key.length > 1 ? "px-1" : "w-[18px]"
)}
>
{key}
</kbd>