diff --git a/src/useDragIndexCarousel.tsx b/src/useDragIndexCarousel.tsx index 90b865a..cfe704e 100644 --- a/src/useDragIndexCarousel.tsx +++ b/src/useDragIndexCarousel.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { CSSProperties, ReactElement, cloneElement } from 'react'; import { useRef, useState, Children, ReactNode } from 'react'; import { createContext, useContext } from 'react'; @@ -84,17 +84,21 @@ function _useDragIndexCarousel( function DragIndexCarousel({ startIndex, minMove, + style, + className, children, }: { startIndex: number; minMove?: number; + style?: CSSProperties; + className?: string; children: ReactNode; }) { const pageLimit = Children.count(children) - 1; const { index, ref, - style, + style: dragStyle, handleTouchStart, handleTouchMove, handleMoveEnd, @@ -106,18 +110,21 @@ function DragIndexCarousel({