Add keyboardType to AlertIOS prompt

This commit is contained in:
Kyle Roach
2018-08-11 03:58:05 -04:00
parent b3387d6338
commit 25c5f17ca6
2 changed files with 25 additions and 1 deletions
+2 -1
View File
@@ -6790,7 +6790,8 @@ export interface AlertIOSStatic {
message?: string,
callbackOrButtons?: ((value: string) => void) | Array<AlertIOSButton>,
type?: AlertType,
defaultValue?: string
defaultValue?: string,
keyboardType?: KeyboardType | KeyboardTypeIOS,
) => void;
}
+23
View File
@@ -16,6 +16,7 @@ import {
Alert,
AppState,
AppStateIOS,
AlertIOS,
BackAndroid,
BackHandler,
Button,
@@ -730,3 +731,25 @@ class AccessibilityTest extends React.Component {
const KeyboardAvoidingViewTest = () => (
<KeyboardAvoidingView enabled />
);
const AlertIOSTest = () => {
AlertIOS.prompt(
'My Prompt',
'Enter your email',
[
{
text: 'Cancel',
style: 'cancel'
},
{
text: 'Add',
onPress: (value: string) => {
console.log(value);
},
},
],
'default',
'email-address'
);
}