The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type * as React from "react"; |
| 2 | |
| 3 | import { cn } from "~/lib/utils"; |
| 4 | |
| 5 | function Kbd({ |
| 6 | className, |
| 7 | variant = "default", |
| 8 | ...props |
| 9 | }: React.ComponentProps<"kbd"> & { |
| 10 | /** `outline` draws a physical key, so the hint stays distinct inside surrounding text. */ |
| 11 | variant?: "default" | "outline"; |
| 12 | }) { |
| 13 | return ( |
| 14 | <kbd |
| 15 | className={cn( |
| 16 | "pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center gap-1 rounded px-1 font-medium font-sans text-muted-foreground text-xs [&_svg:not([class*='size-'])]:size-3", |
| 17 | variant === "outline" |
| 18 | ? "border border-b-2 border-foreground/15 px-1.5" |
| 19 | : "bg-foreground/[0.07]", |
| 20 | className, |
| 21 | )} |
| 22 | data-slot="kbd" |
| 23 | {...props} |
| 24 | /> |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | function KbdGroup({ className, ...props }: React.ComponentProps<"kbd">) { |
| 29 | return ( |
| 30 | <kbd |
| 31 | className={cn("inline-flex items-center gap-1", className)} |
| 32 | data-slot="kbd-group" |
| 33 | {...props} |
| 34 | /> |
| 35 | ); |
| 36 | } |
| 37 | |
| 38 | export { Kbd, KbdGroup }; |