From 507d9dca0d4100453327b7f0f6676365593040fb Mon Sep 17 00:00:00 2001 From: mmatahen Date: Sat, 17 Sep 2022 16:32:51 +0300 Subject: [PATCH 1/3] add animationDuration --- src/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 222aeb6..484b79a 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -49,6 +49,7 @@ interface DefaultStepIndicatorStyles { | undefined; currentStepLabelColor: string; labelFontFamily?: string; + animationDuration?:number; } const defaultStyles: DefaultStepIndicatorStyles = { @@ -76,6 +77,7 @@ const defaultStyles: DefaultStepIndicatorStyles = { labelSize: 13, labelAlign: 'center', currentStepLabelColor: '#4aae4f', + animationDuration:200, }; const StepIndicator = ({ @@ -397,7 +399,7 @@ const StepIndicator = ({ Animated.sequence([ Animated.timing(progressAnim, { toValue: isNaN(animateToPosition) ? 0 : animateToPosition, - duration: 200, + duration: customStyles.animationDuration, useNativeDriver: false, }), Animated.parallel([ From 7e76a4a11a834ec7506c3ed951ed1faba7b77860 Mon Sep 17 00:00:00 2001 From: mmatahen Date: Sat, 17 Sep 2022 17:35:38 +0300 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ac600e8..ebc8ffd 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,7 @@ onPageChange(position){ | ```labelSize``` | Number | 13 | ```labelAlign``` | String | 'center' | ```labelFontFamily``` | String | +| ```animationDuration```|Number | 200 ### Contributing From 85749239469c8b495c4b61a9c5b38d970afabde4 Mon Sep 17 00:00:00 2001 From: mmatahen Date: Sat, 17 Sep 2022 17:42:36 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ebc8ffd..654b684 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,8 @@ const customStyles = { stepIndicatorLabelUnFinishedColor: '#aaaaaa', labelColor: '#999999', labelSize: 13, - currentStepLabelColor: '#fe7013' + currentStepLabelColor: '#fe7013', + animationDuration:200 }