chore(react): cleanup exports
This commit is contained in:
@@ -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]);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user