interface.d.ts
1.71 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
import * as React from 'react';
export interface GenericSliderProps {
min?: number;
max?: number;
step?: number | null;
prefixCls?: string;
vertical?: boolean;
included?: boolean;
disabled?: boolean;
reverse?: boolean;
trackStyle?: React.CSSProperties | React.CSSProperties[];
handleStyle?: React.CSSProperties | React.CSSProperties[];
autoFocus?: boolean;
onFocus?: (e: React.FocusEvent<HTMLDivElement>) => void;
onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void;
className?: string;
marks?: Record<number, React.ReactNode | {
style?: React.CSSProperties;
label?: string;
}>;
dots?: boolean;
maximumTrackStyle?: React.CSSProperties;
style?: React.CSSProperties;
railStyle?: React.CSSProperties;
dotStyle?: React.CSSProperties;
activeDotStyle?: React.CSSProperties;
}
export interface GenericSliderState {
value?: any;
}
export interface GenericSliderClass<Props, State> extends React.Component<Props, State> {
onStart: (position: number) => void;
onEnd: (force?: boolean) => void;
onMove: (e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>, position: number) => void;
onKeyboard: (e: React.KeyboardEvent<HTMLDivElement>) => void;
onChange: (state: {
value: any;
}) => void;
trimAlignValue: (v: number, nextProps?: Partial<Props>) => number;
getUpperBound: () => number;
getLowerBound: () => number;
}
export interface GenericSlider<Props, State> extends Pick<React.ComponentClass<Props, State>, 'displayName' | 'defaultProps' | 'propTypes' | 'contextType' | 'contextTypes' | 'childContextTypes'> {
new (props: Props, context?: any): GenericSliderClass<Props, State>;
}