forked from GregFrench/react-native-wheel-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
58 lines (54 loc) · 1.33 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
48
49
50
51
52
53
54
55
56
57
58
import React from "react";
import { ColorValue, StyleProp, TextStyle, ViewProps, ViewStyle } from "react-native";
export interface PickerItemProps<ItemValue> {
label?: string;
value: ItemValue;
color?: ColorValue;
testID?: string;
}
export interface PickerProps<ItemValue> extends ViewProps {
/**
* @platform android
*/
data?: any[];
/**
* @platform android
*/
enabled?: boolean;
/**
* @platform android
*/
itemSpace?: number;
itemStyle?: StyleProp<TextStyle>;
/**
* to set top and bottom line color (Without gradients)
*/
lineColor?: ColorValue;
/**
* to set top and bottom starting gradient line color
*/
lineGradientColorFrom?: ColorValue;
/**
* to set top and bottom ending gradient
*/
lineGradientColorTo?: ColorValue;
onValueChange?: (itemValue: ItemValue) => void;
selectedIndex?: number;
selectedValue?: ItemValue;
style?: StyleProp<TextStyle>;
/**
* Used for end-to-end tests
*/
testID?: string;
/**
* @platform android
*/
textColor?: ColorValue;
/**
* @platform android
*/
textSize?: number;
}
export default class Picker<ItemValue> extends React.Component<PickerProps<ItemValue>, {}> {
static Item: React.ComponentType<PickerItemProps<ItemValue>>;
}