2023-09-14 10:57:17 -07:00
|
|
|
import React from 'react';
|
|
|
|
import { HotKeys as _HotKeys } from 'react-hotkeys';
|
|
|
|
|
|
|
|
type IHotKeys = React.ComponentProps<typeof _HotKeys>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Wrapper component around `react-hotkeys`.
|
|
|
|
* `react-hotkeys` is a legacy component, so confining its import to one place is beneficial.
|
2023-09-14 11:04:14 -07:00
|
|
|
*
|
|
|
|
* NOTE: Temporarily disabled due to incompatibility with Vite.
|
2023-09-14 10:57:17 -07:00
|
|
|
*/
|
|
|
|
const HotKeys = React.forwardRef<any, IHotKeys>(({ children, ...rest }, ref) => {
|
2023-09-14 11:04:14 -07:00
|
|
|
// return (
|
|
|
|
// <_HotKeys {...rest} ref={ref}>
|
|
|
|
// {children}
|
|
|
|
// </_HotKeys>
|
|
|
|
// );
|
|
|
|
|
|
|
|
return <>{children}</>;
|
2023-09-14 10:57:17 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
export { HotKeys, type IHotKeys };
|