import classNames from 'classnames'; import type { HotkeyAction } from '../../hooks/useHotkey'; import { useFormattedHotkey } from '../../hooks/useHotkey'; import { useOsInfo } from '../../hooks/useOsInfo'; interface Props { action: HotkeyAction | null; className?: string; variant?: 'text' | 'with-bg'; } export function HotKey({ action, className, variant }: Props) { const osInfo = useOsInfo(); const label = useFormattedHotkey(action); if (label === null || osInfo == null) { return null; } return ( {label} ); }