Skip to content

Feature/122 add optional drag step prop #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ Any remaining props not consumed by the component are passed directly to the roo
| orientation | string | "horizontal" | No | Possible values are "horizontal" and "vertical". Let's you have a horizontal or vertical carousel. |
| playDirection | ['forward'|'backward' ] | 'forward' | No | The direction for the auto slideshow |
| step | number | 1 | No | The number of slides to move when pressing the <ButtonBack /> and <ButtonNext /> buttons.|
| tag | string | 'div' | No | The HTML element to use for the provider. |
| dragStep | number | 1 | No | The number of slides to move when performing a short touch drag.|
| tag | string | 'div' | No | The HTML element to use for the provider. |`
| **totalSlides** | number | | **Yes** | Always set this to match the total number of <Slide > components in your carousel |
| touchEnabled | boolean | true | No | Set to true to enable touch events |
| dragEnabled | boolean | true | No | Set to true to enable mouse dragging events |
Expand Down Expand Up @@ -462,6 +463,7 @@ Here's more pseudocode. I've listed a bunch of properties that exist in the Car
slideSize: state.slideSize,
slideTraySize: state.slideTraySize
step: state.step,
dragStep: state.dragStep,
totalSlides: state.totalSlides,
touchEnabled: state.touchEnabled,
dragEnabled: state.dragEnabled,
Expand Down Expand Up @@ -529,6 +531,7 @@ interface CarouselState {
readonly slideSize: number
readonly slideTraySize: number
readonly step: number
readonly dragStep: number
readonly totalSlides: number
readonly touchEnabled: boolean
readonly dragEnabled: boolean
Expand Down
2 changes: 1 addition & 1 deletion dist/index.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.es.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/react-carousel.cjs.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/react-carousel.cjs.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading