From a6bca4041bc95eb9fe43a61e1f4552c5551d9575 Mon Sep 17 00:00:00 2001 From: James Zhang Date: Mon, 4 Jan 2016 13:37:19 -0800 Subject: [PATCH] Fix AlertIOS Examples Summary: This fixes the examples that are out of date. Closes https://github.com/facebook/react-native/pull/5116 Reviewed By: svcscm Differential Revision: D2800319 Pulled By: androidtrunkagent fb-gh-sync-id: da1810c6146950be4be670fc69b9da32fb266303 --- Examples/UIExplorer/AlertIOSExample.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Examples/UIExplorer/AlertIOSExample.js b/Examples/UIExplorer/AlertIOSExample.js index 7532e4151..117c4cfe3 100644 --- a/Examples/UIExplorer/AlertIOSExample.js +++ b/Examples/UIExplorer/AlertIOSExample.js @@ -46,9 +46,8 @@ exports.examples = [{ 'Hello World', null, [ - {text: 'OK', onPress: (text) => console.log('OK pressed')}, - ], - 'default' + {text: 'OK', onPress: (text) => console.log('OK pressed'), type: 'default'} + ] )}> @@ -64,9 +63,9 @@ exports.examples = [{ 'Plain Text Entry', null, [ - {text: 'Submit', onPress: (text) => console.log('Text: ' + text)}, - ], - 'plain-text' + {text: 'Submit', onPress: (text) => console.log('Text: ' + text), type: 'plain-text'}, + {text: 'Cancel', onPress: () => console.log('Cancel'), style: 'cancel'} + ] )}> @@ -82,9 +81,9 @@ exports.examples = [{ 'Secure Text Entry', null, [ - {text: 'Submit', onPress: (text) => console.log('Password: ' + text)}, - ], - 'secure-text' + {text: 'Submit', onPress: (text) => console.log('Password: ' + text), type: 'secure-text'}, + {text: 'Cancel', onPress: () => console.log('Cancel'), style: 'cancel'} + ] )}> @@ -100,9 +99,9 @@ exports.examples = [{ 'Login & Password', null, [ - {text: 'Submit', onPress: (details) => console.log('Login: ' + details.login + '; Password: ' + details.password)}, - ], - 'login-password' + {text: 'Submit', onPress: (details) => console.log('Login: ' + details.login + '; Password: ' + details.password), type: 'login-password'}, + {text: 'Cancel', onPress: () => console.log('Cancel'), style: 'cancel'} + ] )}>