Repository navigation
Expand file tree
/
Copy pathindex.d.ts
More file actions
142 lines (118 loc) · 2.84 KB
/
Copy pathindex.d.ts
File metadata and controls
142 lines (118 loc) · 2.84 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// Type definitions for react-native-material-dialog
// Project: https://github.com/hectahertz/react-native-material-dialog
// Definitions by: Kyle Roach <https://github.com/iRoachie>
// TypeScript Version: 2.2.2
import React from 'react'
interface MaterialDialogStatic extends Dialog {
/**
* Content of the dialog
*/
children?: JSX.Element
}
interface PickerItem {
/**
* Text shown to the user for the item
*/
label: string
/**
* The value retured when the user selects this item
*/
value: string
}
interface SelectedItem {
/**
* The item selected at the time
*/
selectedItem: PickerItem
}
interface Dialog {
/**
* Title text for the dialog
*
* Default value is null
*/
title?: string
/**
* Color of the title text
*
* Default is 'rgba(0, 0, 0, 0.87)'
*/
titleColor?: string
/**
* Accent color used on the buttons and elements
*
* Default is '#51BC78'
*/
colorAccent?: string
/**
* Text for the confirm button
*
* Default value is 'OK'
*/
okLabel?: string
/**
* Text for the cancel button
*
* Default value is 'CANCEL'
*/
cancelLabel?: string
/**
* Determines if the dialog is showing or not
*/
visible: boolean
/**
* Determines if the form is in scrolled mode
*
* Default is false
*/
scrolled?: boolean
/**
* Callback function fired when the confirm(ok) button is pressed
* @param selected
*/
onOk?(selected: SelectedItem): void
/**
* Callback function fired when the cancel button is pressed
* @param selected
*/
onCancel?(selected: SelectedItem): void
}
interface MaterialDialogStatic extends Dialog {
/**
* Content of the dialog
*/
children?: JSX.Element
}
interface PickerItem {
/**
* Text shown to the user for the item
*/
label: string
/**
* The value retured when the user selects this item
*/
value: string
}
interface SinglePickerMaterialDialogStatic extends Dialog {
/**
* List of items shown to the user to select from
*/
items: PickerItem[]
/**
* Currently selected item chosen from the items array
*/
selectedItem: PickerItem
}
interface MultiPickerMaterialDialogStatic extends Dialog {
/**
* List of items shown to the user to select from
*/
items: PickerItem[]
/**
* Currently selected items chosen from the items array
*/
selectedItems: PickerItem[]
}
export class MaterialDialog extends React.Component<MaterialDialogStatic> {}
export class SinglePickerMaterialDialog extends React.Component<SinglePickerMaterialDialogStatic> {}
export class MultiPickerMaterialDialog extends React.Component<MultiPickerMaterialDialogStatic> {}