mirror of
https://github.com/OFFIS-ESC/constellation-analyzer
synced 2026-01-27 07:43:41 +00:00
19 lines
No EOL
547 B
TypeScript
19 lines
No EOL
547 B
TypeScript
import React, { ReactNode } from "react";
|
|
import { useKeyboardShortcutManager } from "../hooks/useKeyboardShortcutManager";
|
|
import { KeyboardShortcutContext } from "./keyboardShortcut";
|
|
|
|
interface KeyboardShortcutProviderProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
export const KeyboardShortcutProvider: React.FC<
|
|
KeyboardShortcutProviderProps
|
|
> = ({ children }) => {
|
|
const shortcuts = useKeyboardShortcutManager();
|
|
|
|
return (
|
|
<KeyboardShortcutContext.Provider value={{ shortcuts }}>
|
|
{children}
|
|
</KeyboardShortcutContext.Provider>
|
|
);
|
|
}; |