@scrolia/react-native
Version:
A headless scrollbar component
14 lines (12 loc) • 497 B
JavaScript
import { createPanResponder } from "./functions/pan.mjs";
import * as React from "react";
const createThumbHandler = (axis) => {
const _panResponder = createPanResponder(axis);
return { panResponder: React.useRef(_panResponder).current };
};
/** Hook for thumb logic. */
const useThumbXHandler = () => createThumbHandler("x");
/** Hook for thumb logic. */
const useThumbYHandler = () => createThumbHandler("y");
export { useThumbXHandler, useThumbYHandler };
//# sourceMappingURL=index.mjs.map