forked from davidchin/react-input-range
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreact-input-range.d.ts
More file actions
48 lines (42 loc) · 1.3 KB
/
react-input-range.d.ts
File metadata and controls
48 lines (42 loc) · 1.3 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
// 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.
/// <reference types="react" />
import {ClassicComponentClass} from 'react';
declare let InputRange: ClassicComponentClass<ReactInputRange.IInputRangeProps>;
export = 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)) => void;
onChangeComplete?: () => void;
step?: number;
value: number | IRange;
}
}