UNPKG

react-optimized-dnd

Version:

A React package for building performant drag-and-drop interfaces. Provides context provider, hooks, and type definitions for flexible, optimized DnD in React apps.

12 lines (11 loc) 762 B
import type { ReactNode } from 'react'; import type { IReactOptimizedDndContextState, IReactOptimizedDndComponentState } from './types'; declare const ReactOptimizedDndContext: import("react").Context<IReactOptimizedDndContextState | null>; export declare function useReactOptimizedDndContext(): IReactOptimizedDndContextState; declare function ReactOptimizedDndProvider({ children, onDragStart, onDragEnd, onDragOver, }: { children: ReactNode; onDragStart?: (state: IReactOptimizedDndComponentState) => void; onDragEnd?: (state: IReactOptimizedDndComponentState) => void; onDragOver?: (state: IReactOptimizedDndComponentState) => void; }): import("react/jsx-runtime").JSX.Element; export { ReactOptimizedDndContext, ReactOptimizedDndProvider };