UNPKG

@patreon/studio

Version:

Patreon Studio Design System

11 lines (10 loc) 366 B
export declare type Direction = 'up' | 'down' | 'left' | 'right'; interface UseSwipeProps { isActive: boolean; handleSwipe: (ev: TouchEvent, direction: Direction) => void; } export declare function useSwipe({ isActive, handleSwipe }: UseSwipeProps): { ref: import("react").RefObject<HTMLDivElement>; currentDirection: Direction | null; }; export {};