/
ScrollViewNativeComponentType.js
80 lines (77 loc) · 2.64 KB
/
ScrollViewNativeComponentType.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
import type {ViewProps} from '../View/ViewPropTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
import type {ScrollEvent} from '../../Types/CoreEventTypes';
import type {PointProp} from '../../StyleSheet/PointPropType';
export type ScrollViewNativeProps = $ReadOnly<{
...ViewProps,
alwaysBounceHorizontal?: ?boolean,
alwaysBounceVertical?: ?boolean,
automaticallyAdjustContentInsets?: ?boolean,
automaticallyAdjustKeyboardInsets?: ?boolean,
automaticallyAdjustsScrollIndicatorInsets?: ?boolean,
bounces?: ?boolean,
bouncesZoom?: ?boolean,
canCancelContentTouches?: ?boolean,
centerContent?: ?boolean,
contentInset?: ?EdgeInsetsProp,
contentInsetAdjustmentBehavior?: ?(
| 'automatic'
| 'scrollableAxes'
| 'never'
| 'always'
),
contentOffset?: ?PointProp,
decelerationRate?: ?('fast' | 'normal' | number),
directionalLockEnabled?: ?boolean,
disableIntervalMomentum?: ?boolean,
endFillColor?: ?ColorValue,
fadingEdgeLength?: ?number,
indicatorStyle?: ?('default' | 'black' | 'white'),
keyboardDismissMode?: ?('none' | 'on-drag' | 'interactive'),
maintainVisibleContentPosition?: ?$ReadOnly<{
minIndexForVisible: number,
autoscrollToTopThreshold?: ?number,
}>,
maximumZoomScale?: ?number,
minimumZoomScale?: ?number,
nestedScrollEnabled?: ?boolean,
onMomentumScrollBegin?: ?(event: ScrollEvent) => void,
onMomentumScrollEnd?: ?(event: ScrollEvent) => void,
onScroll?: ?(event: ScrollEvent) => void,
onScrollBeginDrag?: ?(event: ScrollEvent) => void,
onScrollEndDrag?: ?(event: ScrollEvent) => void,
onScrollToTop?: (event: ScrollEvent) => void,
overScrollMode?: ?('auto' | 'always' | 'never'),
pagingEnabled?: ?boolean,
persistentScrollbar?: ?boolean,
pinchGestureEnabled?: ?boolean,
scrollEnabled?: ?boolean,
scrollEventThrottle?: ?number,
scrollIndicatorInsets?: ?EdgeInsetsProp,
scrollPerfTag?: ?string,
scrollToOverflowEnabled?: ?boolean,
scrollsToTop?: ?boolean,
sendMomentumEvents?: ?boolean,
showsHorizontalScrollIndicator?: ?boolean,
showsVerticalScrollIndicator?: ?boolean,
snapToAlignment?: ?('start' | 'center' | 'end'),
snapToEnd?: ?boolean,
snapToInterval?: ?number,
snapToOffsets?: ?$ReadOnlyArray<number>,
snapToStart?: ?boolean,
zoomScale?: ?number,
// Overrides
onResponderGrant?: ?(e: $FlowFixMe) => void | boolean,
...
}>;