Files
ncd-fe/src/features/ui/components/hotkeys.tsx
marcin mikołajczak 9174bd774a Replace react-hotkeys with updated fork for Vite compatibility
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-26 14:44:01 +01:00

14 lines
459 B
TypeScript

import { HotKeys as _HotKeys, type HotKeysProps } from '@mkljczk/react-hotkeys';
import React from 'react';
/**
* Wrapper component around `react-hotkeys`.
* `react-hotkeys` is a legacy component, so confining its import to one place is beneficial.
*/
const HotKeys = React.forwardRef<any, HotKeysProps>(({ children, ...rest }, ref) => (
<_HotKeys {...rest} ref={ref}>
{children}
</_HotKeys>
));
export { HotKeys, type HotKeysProps as IHotKeys };