-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.d.ts
80 lines (62 loc) · 1.63 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import React from 'react';
import { ViewStyle, StyleProp, TextStyle } from "react-native";
declare module 'react-native-form-select-picker' {
export interface ItemProps {
label: string;
value: any;
}
export class SelectPickerItem extends React.Component<ItemProps> { }
export interface PickerProps {
/**
* Callback for when an item is selected
*/
onValueChange: (value: any, index: number) => void;
/**
* selected property to set the default selected value
*/
selected: any;
/**
* dismissable property to set the modal as dismissable or not.
*/
dismissable?: boolean;
/**
* disabled property to set whole element as selectable or not.
*/
disabled?: boolean;
/**
* placeholder property to show when nothing has been selected.
*/
placeholder?: string;
/**
* style sheet to use when an option is selected.
*/
onSelectedStyle?: StyleProp<ViewStyle>;
/**
* style sheet to use when placeholder is still selected.
*/
placeholderStyle?: StyleProp<TextStyle>;
/**
* style sheet to use for the wrapping view
*/
style?: StyleProp<ViewStyle>;
/**
* container style sheet for the modal container holding the option values
*/
containerStyle?: StyleProp<ViewStyle>;
/**
* Done button text (located at the header section)
*/
doneButtonText?: string;
/**
* Done button styling. (Text component styling)
*/
doneButtonTextStyle?: StyleProp<TextStyle>;
}
export default class SelectPicker extends React.Component<PickerProps> {
/**
* The static class Item.
* used as: <SelectPicker.Item />
*/
static Item: typeof SelectPickerItem;
}
}