FormidableLabs / react-swipeable

React swipe event handler hook
https://commerce.nearform.com/open-source/react-swipeable
MIT License
1.99k stars 146 forks source link

How to change the width of each slide ? #337

Open elvashen-lv opened 9 months ago

elvashen-lv commented 9 months ago

Hi,

I am trying to use this demo https://codesandbox.io/s/react-swipeable-image-carousel-hben8 in my project, but I need to reduce the width of each slide. I tried to set the width, but this made the space between each slide larger. I also tried to add the condition if (!props.sliding) return "none" at the component.tsx, this reduced the space but made the swipe effect not smooth.

Could you please tell me the way to change the width of the slide without making the space between each slide larger?

Thank you.

Regards, Elva