forked from davidchin/react-input-range
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathreact-input-range.d.ts
More file actions
49 lines (43 loc) · 1.28 KB
/
react-input-range.d.ts
File metadata and controls
49 lines (43 loc) · 1.28 KB
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
// usage from react:
// import InputRange = require('react-input-range');
// <InputRange value={this.state.sliderValue} onChange={(a, b) => this.setState({sliderValue})} />
// The legacy 'require'-syntax is preferred, since the module isn't
// ES6-Standard.
declare module 'react-input-range' {
export = ReactInputRange.InputRange;
}
declare namespace ReactInputRange {
interface IRange {
min: number;
max: number;
}
interface IInputRangeProps {
classNames?: {
component?: string;
labelContainer?: string;
labelMax?: string;
labelMin?: string;
labelValue?: string;
slider?: string;
sliderContainer?: string;
trackActive?: string;
trackContainer?: string;
};
ariaLabelledby?: string;
ariaControls?: string;
defaultValue?: number;
disabled?: boolean;
formatLabel?:
(labelValue: string, parameters: { labelPrefix: string, labelSuffix: string}) => string;
labelPrefix?: string;
labelSuffix?: string;
maxValue?: number;
minValue?: number;
name?: string;
onChange: (element: this, value: (number | IRange)) => any;
onChangeComplete?: () => any;
step?: number;
value: number | IRange;
}
export class InputRange extends __React.Component<IInputRangeProps, any> {}
}