UNPKG

@react-querybuilder/dnd

Version:

Drag-and-drop-enabled version of react-querybuilder

27 lines (26 loc) 1 kB
import type { Ref } from "react"; import * as React from "react"; import type { useDrop as useDropOriginal } from "react-dnd"; import type { DropEffect, InlineCombinatorProps } from "react-querybuilder"; import type { QueryBuilderDndContextProps } from "./types"; /** * The drag-and-drop-enabled inline combinator component. * * @group Components */ export declare const InlineCombinatorDnD: ({ component: CombinatorSelectorComponent,...props }: InlineCombinatorProps) => React.JSX.Element; type UseInlineCombinatorDndParams = InlineCombinatorProps & Pick<QueryBuilderDndContextProps, "canDrop" | "copyModeModifierKey" | "groupModeModifierKey"> & { useDrop: typeof useDropOriginal; }; interface UseInlineCombinatorDnD { isOver: boolean; dropMonitorId: string | symbol | null; dropRef: Ref<HTMLDivElement>; dropEffect?: DropEffect; groupItems?: boolean; } /** * @group Hooks */ export declare const useInlineCombinatorDnD: (params: UseInlineCombinatorDndParams) => UseInlineCombinatorDnD; export {};