useDragInteraction Function

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

useDragInteraction(onClick?: () => void, onOpenPanel?: () => void): { handleButtonClick: () => void, handlePointerDown: (e: 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: PointerEvent<Element>) => void }

Defined in

Last Updated: 22 March, 2024