import { cn } from '@/lib/utils'; type KeyState = 'idle' | 'active' | 'success'; interface OnboardingKeyboardProps { /** The key to emphasise. Defaults to the record key. */ highlightKey?: string; state: KeyState; /** Hold progress (0–1), fills the emphasised key from the bottom. */ progress?: number; } interface KeyCapProps { label: string; hero?: boolean; state?: KeyState; progress?: number; className?: string; } function KeyCap({ label, hero, state = 'idle', progress = 0, className, }: KeyCapProps) { return (
{hero && state !== 'success' && progress > 0 && ( )} {label}
); } /** * Draws the record key in its physical context: Esc above, 1 to its right, and * Tab / Q on the row below — so the key is recognisable on a real keyboard. */ export function OnboardingKeyboard({ highlightKey = '`', state, progress = 0, }: OnboardingKeyboardProps) { return (
); }