This repository was archived by the owner on Sep 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathreact-native-picker-module.d.ts
85 lines (80 loc) · 1.97 KB
/
react-native-picker-module.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
81
82
83
84
85
// Type definitions for react-native-picker-module 2.0.7
// Project: https://github.com./talut/react-native-picker-module
// Definitions by: Talut TASGIRAN <https://github.com./talut>
// TypeScript Version: 3.8.2
declare module "react-native-picker-module" {
import { FunctionComponent, RefObject } from "react"
export interface PickerRef {
/**
* Show picker
* @returns void
*/
show: () => void,
/**
* Hide picker
* @returns void
*/
hide: () => void,
}
export interface ReactNativePickerModuleProps {
/**
* Initial value of picker
* @default undefined
*/
value?: string
/**
* Items of picker
* @default []
*/
items: any[]
/**
* Title of picker
* @default undefined
*/
title?: string
/**
* Ref of picker
* @default undefined
*/
ref?: RefObject<PickerRef>
/**
* Callback function run after value changed
* @param value
*/
onValueChange: (value: any) => void
/**
* Callback function run after cancel
*/
onCancel?: () => void
/**
* Text of cancel button for IOS
* @default Cancel
*/
cancelButton?: string
/**
* Text of confirm button for IOS
* @default Confirm
*/
confirmButton?: string
contentContainerStyle?: object
/**
* To set confirm button disabled state if value is not selected yet for IOS
*/
confirmButtonAlwaysEnabled?: boolean,
confirmButtonStyle?: object
cancelButtonStyle?: object,
titleStyle?: object
itemStyle?: object
useNativeDriver?: boolean
confirmButtonDisabledTextStyle?: object
confirmButtonEnabledTextStyle?: object
cancelButtonTextStyle?: object
backdropColor?: string
backdropOpacity?: number
selectedColor?: string
backgroundColor?: string
tintColor?: string
}
const ReactNativePickerModule: FunctionComponent<ReactNativePickerModuleProps>
export default ReactNativePickerModule
}