forked from mmarkelov/react-nouislider
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
92 lines (87 loc) · 2.26 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
import * as React from 'react';
import { cssClasses } from 'nouislider';
export interface Callback {
/**
* Array for both one-handle and two-handle sliders. It contains the current slider values,
* with formatting applied.
*/
(values: any[], handle: number, unencodedValues: number[], tap: boolean, positions: number[]): void;
}
export interface Formatter {
to(val: number): string | number;
from(val: string | number): number;
}
export interface CssClasses {
target: string,
base: string,
origin: string,
handle: string,
handleLower: string,
handleUpper: string,
touchArea: string,
horizontal: string,
vertical: string,
background: string,
connect: string,
connects: string,
ltr: string,
rtl: string,
textDirectionLtr: string,
textDirectionRtl: string,
draggable: string,
drag: string,
tap: string,
active: string,
tooltip: string,
pips: string,
pipsHorizontal: string,
pipsVertical: string,
marker: string,
markerHorizontal: string,
markerVertical: string,
markerNormal: string,
markerLarge: string,
markerSub: string,
value: string,
valueHorizontal: string,
valueVertical: string,
valueNormal: string,
valueLarge: string,
valueSub: string,
}
export interface NouisliderProps {
animate?: boolean;
behaviour?: string;
className?: string;
clickablePips?: boolean;
connect?: boolean[] | boolean;
direction?: "ltr" | "rtl";
disabled?: boolean;
format?: Formatter;
keyboardSupport?: boolean;
id?: string;
instanceRef?: (instance: React.Ref<any>) => void;
limit?: number;
margin?: number;
cssPrefix?: string;
cssClasses?: Partial<CssClasses>;
onChange?: Callback;
onEnd?: Callback;
onSet?: Callback;
onSlide?: Callback;
onStart?: Callback;
onUpdate?: Callback;
orientation?: "horizontal" | "vertical";
padding?: number | number[];
pips?: object;
range: object;
snap?: boolean;
start: number | number[] | string | string[];
step?: number;
style?: React.CSSProperties;
tooltips?: boolean | (boolean | Formatter)[];
}
export default class Nouislider extends React.Component<NouisliderProps> {}
export {
cssClasses,
}