import { default as React, FunctionComponent } from 'react'; import { BasicComponent } from '../../utils/typings'; import { DragState } from './drag'; export interface DragProps extends BasicComponent { /** * 是否开启自动吸边 * @default false */ attract: boolean /** * 拖拽元素的拖拽方向限制 * @default all */ direction: 'x' | 'y' | 'lock' | undefined /** * 拖拽元素的拖拽边界 * @default {top: 0, left: 0, right: 0, bottom: 0} */ boundary: { top: number; left: number; right: number; bottom: number; } /** * 开始拖拽元素 * @default - */ onDragStart: () => void /** * 停止拖拽元素 * @default - */ onDragEnd: (state: DragState) => void /** * 拖拽元素 * @default - */ onDrag: (state: DragState) => void } export declare const Drag: FunctionComponent & React.HTMLAttributes>;