Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 2138x 376x | import { Shortcut as ShortcutType } from "just-search-it";
import { Shortcut } from "../ahuora-design-system/ui/shortcut";
export function KeyboardShortcuts({
shortcuts,
}: {
shortcuts?: ShortcutType[];
}) {
return shortcuts?.map((shortcut, index) => {
return (
<div key={index} className="ml-auto flex gap-1">
{shortcut.ctrlKey && <Shortcut>Ctrl</Shortcut>}
{shortcut.shiftKey && <Shortcut>Shift</Shortcut>}
{shortcut.altKey && <Shortcut>Alt</Shortcut>}
{shortcut.metaKey && <Shortcut>Cmd</Shortcut>}
<Shortcut>{shortcut.key}</Shortcut>
</div>
);
});
}
|