Newer
Older
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
declare module 'react-swipeable-views' {
import * as React from 'react'
export type OnChangeIndexCallback = (
index: number,
indexLatest: number
) => void
export type OnTransitionEndCallback = () => void
export type OnSwitchingCallback = (
index: number,
type: OnSwitchingCallbackTypeDescriptor
) => void
export type OnSwitchingCallbackTypeDescriptor = 'move' | 'end'
export type AxisType = 'x' | 'x-reverse' | 'y' | 'y-reverse'
export interface SpringConfig {
duration: string
easeFunction: string
delay: string
}
export interface SwipeableViewsProps extends React.HTMLProps<HTMLDivElement> {
animateHeight?: boolean
animateTransitions?: boolean
axis?: AxisType
containerStyle?: React.CSSProperties
disabled?: boolean
/*
* This is the config used to disable lazy loading, if true it will render all the views in first rendering.
*/
disableLazyLoading?: boolean
enableMouseEvents?: boolean
hysteresis?: number
ignoreNativeScroll?: boolean
index?: number
onChangeIndex?: OnChangeIndexCallback
onSwitching?: OnSwitchingCallback
onTransitionEnd?: OnTransitionEndCallback
resistance?: boolean
style?: React.CSSProperties
slideStyle?: React.CSSProperties
springConfig?: SpringConfig
slideClassName?: string
threshold?: number
}
export interface SwipeableViewsState {
indexCurrent?: number
indexLatest?: number
isDragging?: boolean
isFirstRender?: boolean
heightLatest?: number
displaySameSlide?: boolean
}
export default class SwipeableViews extends React.Component<
SwipeableViewsProps,
SwipeableViewsState
> {}
}