Skip to content

Commit e0bd798

Browse files
Added prop to override containers styles
1 parent e579036 commit e0bd798

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/SwipeableWrapper/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const SwipeableWrapper = forwardRef(
4242
filterNodes,
4343
transitionDuration,
4444
transitionTimingFunction,
45+
containerStyles,
4546
},
4647
ref,
4748
) => {
@@ -191,7 +192,7 @@ const SwipeableWrapper = forwardRef(
191192
}, [onRestFn]);
192193

193194
return (
194-
<div style={{ width: "inherit", overflow: "hidden" }}>
195+
<div style={{ width: "inherit", overflow: "hidden", ...containerStyles }}>
195196
<div
196197
{...bind()}
197198
style={{
@@ -230,6 +231,7 @@ SwipeableWrapper.propTypes = {
230231
filterNodes: PropTypes.arrayOf(PropTypes.string),
231232
transitionDuration: PropTypes.number,
232233
transitionTimingFunction: PropTypes.string,
234+
containerStyles: PropTypes.shape({}),
233235
};
234236

235237
SwipeableWrapper.defaultProps = {
@@ -239,6 +241,7 @@ SwipeableWrapper.defaultProps = {
239241
filterNodes: [],
240242
transitionDuration: 300,
241243
transitionTimingFunction: "ease-out",
244+
containerStyles: {},
242245
};
243246

244247
export default memo(SwipeableWrapper);

0 commit comments

Comments
 (0)