-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathindex.d.ts
47 lines (43 loc) · 1.28 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
import * as React from 'react';
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;
}
interface Formatter {
to(val: number): string | number;
from(val: string | number): number;
}
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;
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> {}