| 1 | import type * as React from "react"; |
| 2 | |
| 3 | import { cn } from "~/lib/utils"; |
| 4 | |
| 5 | function Kbd({ className, ...props }: React.ComponentProps<"kbd">) { |
| 6 | return ( |
| 7 | <kbd |
| 8 | className={cn( |
| 9 | "pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center gap-1 rounded bg-muted px-1 font-medium font-sans text-muted-foreground text-xs [&_svg:not([class*='size-'])]:size-3", |
| 10 | className, |
| 11 | )} |
| 12 | data-slot="kbd" |
| 13 | {...props} |
| 14 | /> |
| 15 | ); |
| 16 | } |
| 17 | |
| 18 | function KbdGroup({ className, ...props }: React.ComponentProps<"kbd">) { |
| 19 | return ( |
| 20 | <kbd |
| 21 | className={cn("inline-flex items-center gap-1", className)} |
| 22 | data-slot="kbd-group" |
| 23 | {...props} |
| 24 | /> |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | export { Kbd, KbdGroup }; |