-
Notifications
You must be signed in to change notification settings - Fork 157
/
index.d.ts
45 lines (42 loc) · 1.32 KB
/
index.d.ts
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
import {ReactElement, Component} from 'react'
import {
Animated,
StyleProp,
ViewStyle,
PanResponderGestureState,
GestureResponderHandlers
} from 'react-native'
export interface SlidingUpPanelProps {
height?: number
animatedValue?: Animated.Value
draggableRange?: {top: number; bottom: number}
snappingPoints?: number[]
minimumVelocityThreshold?: number
minimumDistanceThreshold?: number
avoidKeyboard?: boolean
onBackButtonPress?: () => boolean
onDragStart?: (value: number, gestureState: PanResponderGestureState) => void
onDragEnd?: (value: number, gestureState: PanResponderGestureState) => void
onMomentumDragStart?: (value: number) => void
onMomentumDragEnd?: (value: number) => void
onBottomReached?: () => any
allowMomentum?: boolean
allowDragging?: boolean
showBackdrop?: boolean
backdropOpacity?: number
friction?: number
containerStyle?: StyleProp<ViewStyle>
backdropStyle?: StyleProp<ViewStyle>
children?:
| ReactElement
| ((dragHandlers: GestureResponderHandlers) => ReactElement)
}
export interface SlidingUpPanelAnimationConfig {
toValue: number
velocity: number
}
export default class SlidingUpPanel extends Component<SlidingUpPanelProps> {
show: (value?: number | SlidingUpPanelAnimationConfig) => void
hide: () => void
scrollIntoView: (node: number) => void
}