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: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.