@matthew.ngo/react-form-kit
Version:
Form Kit for React. It consists of a set of components that can be used to create complex forms in a simple and declarative way.
8 lines (7 loc) • 483 B
TypeScript
import { DragEvent, KeyboardEvent } from 'react';
export declare const useDragAndDrop: (listItems: any[], setListItems: (items: any[]) => void, onReorder: (items: any[]) => void) => {
handleDragStart: (e: DragEvent<HTMLLIElement>, index: number) => void;
handleDragOver: (e: DragEvent<HTMLLIElement>, index: number) => void;
handleDrop: (e: DragEvent<HTMLLIElement>, index: number) => void;
handleKeyDown: (e: KeyboardEvent<HTMLLIElement>, index: number) => void;
};