import classNames from 'classnames'; import type { HotkeyAction } from '../../hooks/useHotKey'; import { useFormattedHotkey } from '../../hooks/useHotKey'; import { HStack } from './Stacks'; interface Props { action: HotkeyAction | null; className?: string; variant?: 'text' | 'with-bg'; } export function Hotkey({ action, className, variant }: Props) { const labelParts = useFormattedHotkey(action); if (labelParts === null) { return null; } return ; } interface HotkeyRawProps { labelParts: string[]; className?: string; variant?: 'text' | 'with-bg'; } export function HotkeyRaw({ labelParts, className, variant }: HotkeyRawProps) { return ( {labelParts.map((char, index) => ( // biome-ignore lint/suspicious/noArrayIndexKey: none
{char}
))}
); }