/** * A keyboard shortcut as the keys to press, one quiet chip per key: ["⌘", "K"] * reads as two keys, not as the text "⌘K". The chips take the colour of the * text around them, so the same shortcut sits in a tooltip, a menu row or a * button without a palette of its own. */ export default function Kbd({ keys, className = '' }: { keys: readonly string[]; className?: string }) { return ( {keys.map((key, i) => ( {key} ))} ); } /** Whether shortcuts here read with ⌘ rather than Ctrl. */ export function isApplePlatform(): boolean { return typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/.test(navigator.userAgent); }