chore(react): cleanup exports

This commit is contained in:
moklick
2024-01-08 11:59:01 +01:00
parent 1efd3ee3d5
commit 30c975e39f
26 changed files with 64 additions and 72 deletions
@@ -2,8 +2,8 @@ import { useEffect } from 'react';
import type { KeyCode } from '@xyflow/system';
import { useStoreApi } from '../hooks/useStore';
import useKeyPress, { UseKeyPressOptions } from './useKeyPress';
import useReactFlow from './useReactFlow';
import { useKeyPress, UseKeyPressOptions } from './useKeyPress';
import { useReactFlow } from './useReactFlow';
import { Edge, Node } from '../types';
const selected = (item: Node | Edge) => item.selected;
@@ -15,13 +15,13 @@ const deleteKeyOptions: UseKeyPressOptions = { actInsideInputWithModifier: false
*
* @internal
*/
export default ({
export function useGlobalKeyHandler({
deleteKeyCode,
multiSelectionKeyCode,
}: {
deleteKeyCode: KeyCode | null;
multiSelectionKeyCode: KeyCode | null;
}): void => {
}): void {
const store = useStoreApi();
const { deleteElements } = useReactFlow();
@@ -39,4 +39,4 @@ export default ({
useEffect(() => {
store.setState({ multiSelectionActive: multiSelectionKeyPressed });
}, [multiSelectionKeyPressed]);
};
}