diff --git a/releases/next/docs/alert.html b/releases/next/docs/alert.html index 59272fe5126..f8a977b5d78 100644 --- a/releases/next/docs/alert.html +++ b/releases/next/docs/alert.html @@ -4,7 +4,9 @@ button will be an 'OK' button.

This is an API that works both on alerts. To show an alert that prompts the user to enter some information, see AlertIOS; entering text in an alert is common on iOS only.

iOS #

On iOS you can specify any number of buttons. Each button can optionally specify a style, which is one of 'default', 'cancel' or 'destructive'.

Android #

On Android at most three buttons can be specified. Android has a concept -of a neutral, negative and a positive button:

// Works on both iOS and Android +of a neutral, negative and a positive button:

Note that by default alerts on Android can be dismissed by clicking outside of their alert box. +To prevent this behavior, you can provide +an optional options parameter { cancelable: false } to the Alert method.

Example usage:

// Works on both iOS and Android Alert.alert( 'Alert Title', 'My Alert Msg', @@ -12,7 +14,8 @@ of a neutral, negative and a positive button:

  • If you specify one butt {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')}, {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'}, {text: 'OK', onPress: () => console.log('OK Pressed')}, - ] + ], + { cancelable: false } )

Methods #

static alert(title, message?, buttons?, options?, type?) #

You can edit the content above on GitHub and send us a pull request!

Examples #

Edit on GitHub
'use strict'; var React = require('react');