-
Notifications
You must be signed in to change notification settings - Fork 402
/
index.d.ts
100 lines (86 loc) · 2.67 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
88
89
90
91
92
93
94
95
96
97
98
99
100
// 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 StepsAsProps {
index: number;
stepLabel: string;
prefix: string;
suffix: string;
}
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;
stepsAs?: StepsAsProps[];
optionsArray?: number[];
containerStyle?: ViewStyle;
trackStyle?: ViewStyle;
selectedStyle?: ViewStyle;
unselectedStyle?: ViewStyle;
markerContainerStyle?: ViewStyle;
markerStyle?: ViewStyle;
disabledMarkerStyle?: ViewStyle;
pressedMarkerStyle?: ViewStyle;
stepStyle?: ViewStyle;
stepLabelStyle?: ViewStyle;
stepMarkerStyle?: ViewStyle;
valuePrefix?: string;
valueSuffix?: string;
showSteps?: boolean;
showStepMarkers?: boolean;
showStepLabels?: boolean;
enabledOne?: boolean;
enabledTwo?: boolean;
onToggleOne?: () => void;
onToggleTwo?: () => void;
allowOverlap?: boolean;
snapped?: boolean;
smoothSnapped?: boolean;
markerOffsetX?: number;
markerOffsetY?: number;
minMarkerOverlapDistance?: number;
minMarkerOverlapStepDistance?: number;
imageBackgroundSource?: string;
enableLabel?: boolean;
vertical?: boolean;
}
export default class MultiSlider extends React.Component<MultiSliderProps> {}