+
+ {Children.map(children, (child: ReactElement) =>
+ cloneElement(child, {
+ style: { ...child.props.style, flexShrink: 0 },
+ })
+ )}
+
+
+ )
+);
+
+export default function useDragIndexCarousel(
+ dataLength: number,
+ startIndex = 0,
+ minMove = 60
+) {
const {
index,
ref,
- style: dragStyle,
handleTouchStart,
handleTouchMove,
handleMoveEnd,
handleScrollStart,
handleScrollMove,
- } = _useDragIndexCarousel(pageLimit, minMove, startIndex);
+ next,
+ prev,
+ isEnd,
+ isStart,
+ } = _useDragIndexCarousel(dataLength - 1, minMove, startIndex);
- return (
-