forked from ptomasroos/react-native-multi-slider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
87 lines (75 loc) · 2.41 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
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
81
82
83
84
85
86
87
// Type definitions for @ptomasroos/react-native-multi-slider 0.0
// Project: https://github.com/ptomasroos/react-native-multi-slider#readme
// Definitions by: Edward Sammut Alessi <https://github.com/Slessi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react";
import { ViewStyle } from "react-native";
export interface MarkerProps {
pressed: boolean;
pressedMarkerStyle: ViewStyle;
markerStyle: ViewStyle;
enabled: boolean;
currentValue: number;
valuePrefix: string;
valueSuffix: string;
}
export interface LabelProps {
oneMarkerValue: string | number;
twoMarkerValue: string | number;
minValue: number;
maxValue: number;
oneMarkerLeftPosition: number;
twoMarkerLeftPosition: number;
oneMarkerPressed: boolean;
twoMarkerPressed: boolean;
}
export interface MultiSliderProps {
values?: number[];
onValuesChange?: (values: number[]) => void;
onValuesChangeStart?: () => void;
onValuesChangeFinish?: (values: number[]) => void;
sliderLength?: number;
touchDimensions?: {
height: number;
width: number;
borderRadius: number;
slipDisplacement: number;
};
customMarker?: React.ComponentType<MarkerProps>;
customMarkerLeft?: React.ComponentType<MarkerProps>;
customMarkerRight?: React.ComponentType<MarkerProps>;
customLabel?: React.ComponentType<LabelProps>;
isMarkersSeparated?: boolean;
min?: number;
max?: number;
step?: number;
optionsArray?: number[];
containerStyle?: ViewStyle;
trackContainerStyle?: ViewStyle;
trackStyle?: ViewStyle;
trackThreeStyle?: ViewStyle;
selectedStyle?: ViewStyle;
unselectedStyle?: ViewStyle;
markerContainerStyle?: ViewStyle;
markerStyle?: ViewStyle;
pressedMarkerStyle?: ViewStyle;
valuePrefix?: string;
valueSuffix?: string;
enabledOne?: boolean;
enabledTwo?: boolean;
hideMarkerOne?: boolean;
hideMarkerTwo?: boolean;
onToggleOne?: () => void;
onToggleTwo?: () => void;
allowOverlap?: boolean;
snapped?: boolean;
markerOffsetX?: number;
markerOffsetY?: number;
minMarkerOverlapDistance?: number;
minMarkerOverlapStepDistance?: number;
imageBackgroundSource?: string;
enableLabel?: boolean;
vertical?: boolean;
}
export default class MultiSlider extends React.Component<MultiSliderProps> {}