Skip to content

Commit

Permalink
Export flow type for ScrollView Deceleration Rate
Browse files Browse the repository at this point in the history
Summary:
## Changelog:
[General] [Changed] Export Flow type for deceleration rate for use in other files to keep deceleration rate prop values consistently typed

Reviewed By: lunaleaps

Differential Revision: D32989199

fbshipit-source-id: 2e2fef0721de0d0eb60aaefdbb635788bfc8c1f1
  • Loading branch information
Amy Huyen authored and facebook-github-bot committed Dec 10, 2021
1 parent 896a5c9 commit 9b0ed92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/Components/ScrollView/ScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export type ScrollViewImperativeMethods = $ReadOnly<{|
>,
|}>;

export type DecelerationRateType = 'fast' | 'normal' | number;
export type ScrollResponderType = ScrollViewImperativeMethods;

type IOSProps = $ReadOnly<{|
Expand Down Expand Up @@ -473,7 +474,7 @@ export type Props = $ReadOnly<{|
* - `'normal'`: 0.998 on iOS, 0.985 on Android (the default)
* - `'fast'`: 0.99 on iOS, 0.9 on Android
*/
decelerationRate?: ?('fast' | 'normal' | number),
decelerationRate?: ?DecelerationRateType,
/**
* When true, the scroll view's children are arranged horizontally in a row
* instead of vertically in a column. The default value is false.
Expand Down

0 comments on commit 9b0ed92

Please sign in to comment.