diff --git a/src/SwipeableList.js b/src/SwipeableList.js index 91e2961..ee52c6d 100644 --- a/src/SwipeableList.js +++ b/src/SwipeableList.js @@ -7,9 +7,15 @@ const SwipeableList = ({ children, scrollStartThreshold, swipeStartThreshold, - threshold + threshold, + className, + ...rest }) => ( -
+
{React.Children.map(children, child => React.cloneElement(child, { scrollStartThreshold, @@ -24,7 +30,8 @@ SwipeableList.propTypes = { children: PropTypes.node, scrollStartThreshold: PropTypes.number, swipeStartThreshold: PropTypes.number, - threshold: PropTypes.number + threshold: PropTypes.number, + className: PropTypes.string }; export default SwipeableList; diff --git a/src/module.d.ts b/src/module.d.ts index 18b57c9..47e4ee2 100644 --- a/src/module.d.ts +++ b/src/module.d.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -interface ISwipeableListProps { +interface ISwipeableListProps extends React.DetailedHTMLProps, HTMLDivElement> { scrollStartThreshold?: number; swipeStartThreshold?: number; threshold?: number;