vue3-dnd
Version:
Drag and Drop for Vue Composition API
14 lines (13 loc) • 830 B
TypeScript
import type { ConnectDragSource, ConnectDragPreview } from '../../types';
import type { DragSourceHookSpec, FactoryOrInstance } from '../types';
import { Ref } from 'vue-demi';
import { DragPreviewOptions, DragSourceOptions } from '../../types';
/**
* useDragSource hook
* @param specArg The drag source specification (object or function, function preferred)
*/
export declare function useDrag<DragObject = unknown, DropResult = unknown, CollectedProps = unknown, ConnectDragSourceOptions extends DragSourceOptions = DragSourceOptions, ConnectDragPreviewOption extends DragPreviewOptions = DragPreviewOptions>(specArg: FactoryOrInstance<DragSourceHookSpec<DragObject, DropResult, CollectedProps>>): [
Ref<CollectedProps>,
ConnectDragSource<ConnectDragSourceOptions>,
ConnectDragPreview<ConnectDragPreviewOption>
];