useDragInteraction Function

Hook used on expandable item that require drag or long press to open

useDragInteraction(onClick?: () => void, onOpenPanel?: () => void): { handleButtonClick: () => void, handlePointerDown: (e: React.PointerEvent<Element>) => void }

Parameter Type Description
onClick () => void Function called when item is clicked.
onOpenPanel () => void Function called when item is dragged or long pressed to open panel.

Returns - { handleButtonClick: () => void, handlePointerDown: (e: React.PointerEvent<Element>) => void }

Defined in

Last Updated: 17 December, 2024