This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect, useLayoutEffect, useState, type RefObject } from "react"; | |
| type Direction = "top" | "bottom" | "left" | "right"; | |
| type Vector = [number, number]; | |
| interface UseSwipeOptions { | |
| /** | |
| * Callback for swipe events | |
| */ | |
| onSwipe: (direction: Direction, vector: Vector) => void; |
OlderNewer