download
raw
911 Bytes
import { dragAction, pinchAction, scrollAction, wheelAction, moveAction, hoverAction } from '@use-gesture/core/actions'
import { GestureHandlers, UserGestureConfig, EventTypes, AnyHandlerEventTypes } from '@use-gesture/core/types'
import { createUseGesture } from './createUseGesture'
/**
* @public
*
* The most complete gesture hook, allowing support for multiple gestures.
*
* @param {GestureHandlers} handlers - an object with on[Gesture] keys containg gesture handlers
* @param {UserGestureConfig} config - the full config object
*/
export function useGesture<
HandlerTypes extends AnyHandlerEventTypes = EventTypes,
Config extends UserGestureConfig = UserGestureConfig
>(handlers: GestureHandlers<HandlerTypes>, config?: Config) {
const hook = createUseGesture([dragAction, pinchAction, scrollAction, wheelAction, moveAction, hoverAction])
return hook(handlers, config || ({} as Config))
}

Xet Storage Details

Size:
911 Bytes
·
Xet hash:
40ef0274462b3b7b81ac6058a44466602cdc374fb52fcc75438f68fb2cd0502c

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.