UNPKG

easemob-chat-uikit

Version:

![Static Badge](https://img.shields.io/badge/platform-React-green) ![Static Badge](https://img.shields.io/badge/language-typescript-green) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/easemob/Easemob-UIKit-web) ![GitHub last c

45 lines (44 loc) 961 B
/// <reference types="react" /> interface DraggableState { isDragging: boolean; dragOffset: { x: number; y: number; }; } interface DraggableOptions { enabled?: boolean; resizableEnabled?: boolean; onDragStart?: (startPosition: { x: number; y: number; }) => void; onDrag?: (newPosition: { x: number; y: number; }, delta: { x: number; y: number; }) => void; onDragEnd?: (finalPosition: { x: number; y: number; }) => void; containerRef?: React.RefObject<HTMLElement>; dragHandle?: string; getCurrentPosition?: () => { left: number; top: number; }; } export declare const useDraggable: (options?: DraggableOptions) => { state: DraggableState; isDragging: boolean; dragOffset: { x: number; y: number; }; hasDragged: boolean; justFinishedDrag: boolean; }; export {};