UNPKG

2.63 kBTypeScriptView Raw
1import React from 'react';
2import { Animated, ViewStyle, StyleProp } from 'react-native';
3import { RneFunctionComponent } from '../helpers';
4declare type Sizable = {
5 width: number;
6 height: number;
7};
8export declare type SliderProps = {
9 value?: number;
10 disabled?: boolean;
11 minimumValue?: number;
12 maximumValue?: number;
13 step?: number;
14 minimumTrackTintColor?: string;
15 maximumTrackTintColor?: string;
16 allowTouchTrack?: boolean;
17 thumbTintColor?: string;
18 thumbTouchSize?: Sizable;
19 onValueChange?(value: number): void;
20 onSlidingStart?(value: number): void;
21 onSlidingComplete?(value: number): void;
22 style?: StyleProp<ViewStyle>;
23 trackStyle?: StyleProp<ViewStyle>;
24 thumbStyle?: StyleProp<ViewStyle>;
25 thumbProps?: any;
26 debugTouchArea?: boolean;
27 animateTransitions?: boolean;
28 animationType?: 'spring' | 'timing';
29 orientation?: 'horizontal' | 'vertical';
30 animationConfig?: Animated.TimingAnimationConfig | Animated.SpringAnimationConfig;
31 containerStyle?: typeof styles;
32};
33declare const Slider: RneFunctionComponent<SliderProps>;
34declare const styles: {
35 containerHorizontal: {
36 height: number;
37 justifyContent: "center";
38 };
39 containerVertical: {
40 width: number;
41 flexDirection: "column";
42 alignItems: "center";
43 };
44 track: {
45 borderRadius: number;
46 };
47 trackHorizontal: {
48 height: number;
49 };
50 trackVertical: {
51 flex: number;
52 width: number;
53 };
54 thumb: {
55 position: "absolute";
56 width: number;
57 height: number;
58 borderRadius: number;
59 };
60 touchArea: {
61 position: "absolute";
62 backgroundColor: string;
63 top: number;
64 left: number;
65 right: number;
66 bottom: number;
67 };
68 debugThumbTouchArea: {
69 position: "absolute";
70 backgroundColor: string;
71 opacity: number;
72 };
73};
74export { Slider };
75declare const _default: React.FunctionComponent<Pick<SliderProps & Partial<import("../config").ThemeProps<SliderProps>>, "style" | "disabled" | "containerStyle" | "value" | "animationType" | "orientation" | "minimumValue" | "maximumValue" | "step" | "minimumTrackTintColor" | "maximumTrackTintColor" | "allowTouchTrack" | "thumbTintColor" | "thumbTouchSize" | "onValueChange" | "onSlidingStart" | "onSlidingComplete" | "trackStyle" | "thumbStyle" | "thumbProps" | "debugTouchArea" | "animateTransitions" | "animationConfig">> | React.ForwardRefExoticComponent<SliderProps & Partial<import("../config").ThemeProps<SliderProps>>>;
76export default _default;