mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Add keyboardType to AlertIOS prompt
This commit is contained in:
Vendored
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user