From bfaff6a71e22753bae1a3144a1bba1e2642d2887 Mon Sep 17 00:00:00 2001 From: RichardRNStudio Date: Tue, 30 Apr 2024 22:55:30 +0200 Subject: [PATCH] feat(#26): add limitToSlide new property --- README.md | 1 + src/components/SliderProvider.tsx | 2 +- src/defaultProps.tsx | 5 ++++- src/interfaces/ISliderIntro.interface.ts | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6094b78..05cc103 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ The package includes two render options. Besides the `default render` when you c | `showStatusBar` | boolean | false | Show status bar on top of screen. You can make your own status bar outside of this component | | `statusBarColor` | color| #febe29 | Background color of status bar | | `renderStatusBar` | function | Default status bar renderer | Use to supply your own status bar component | +| `limitToSlide` | number | (Device max width) * 0.35 | Use to change the limit of the slide animation. It is calculated based on the PanResponder's `gestureState.dx` property. For example, your device's width: 400px, the limit is 400 * 0.35 = 140px, so you need to swipe at least 140px to left or right to reach the next slide in the row.

Examples