mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
update website
This commit is contained in:
+2
-4
@@ -3,8 +3,7 @@ respective onPress callback and dismiss the alert. By default, the only
|
||||
button will be an 'OK' button.</p><p>This is an API that works both on iOS and Android and can show static
|
||||
alerts. To show an alert that prompts the user to enter some information,
|
||||
see <code>AlertIOS</code>; entering text in an alert is common on iOS only.</p><h2><a class="anchor" name="ios"></a>iOS <a class="hash-link" href="#ios">#</a></h2><p>On iOS you can specify any number of buttons. Each button can optionally
|
||||
specify a style and you can also specify type of the alert. Refer to
|
||||
<code>AlertIOS</code> for details.</p><h2><a class="anchor" name="android"></a>Android <a class="hash-link" href="#android">#</a></h2><p>On Android at most three buttons can be specified. Android has a concept
|
||||
specify a style, which is one of 'default', 'cancel' or 'destructive'.</p><h2><a class="anchor" name="android"></a>Android <a class="hash-link" href="#android">#</a></h2><p>On Android at most three buttons can be specified. Android has a concept
|
||||
of a neutral, negative and a positive button:</p><ul><li>If you specify one button, it will be the 'positive' one (such as 'OK')</li><li>Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK')</li><li>Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK')</li></ul><div class="prism language-javascript"><span class="token comment" spellcheck="true">// Works on both iOS and Android
|
||||
</span>Alert<span class="token punctuation">.</span><span class="token function">alert<span class="token punctuation">(</span></span>
|
||||
<span class="token string">'Alert Title'</span><span class="token punctuation">,</span>
|
||||
@@ -19,7 +18,6 @@ of a neutral, negative and a positive button:</p><ul><li>If you specify one butt
|
||||
<span class="token keyword">var</span> React <span class="token operator">=</span> <span class="token function">require<span class="token punctuation">(</span></span><span class="token string">'react-native'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token keyword">var</span> <span class="token punctuation">{</span>
|
||||
Alert<span class="token punctuation">,</span>
|
||||
Platform<span class="token punctuation">,</span>
|
||||
StyleSheet<span class="token punctuation">,</span>
|
||||
Text<span class="token punctuation">,</span>
|
||||
TouchableHighlight<span class="token punctuation">,</span>
|
||||
@@ -135,7 +133,7 @@ of a neutral, negative and a positive button:</p><ul><li>If you specify one butt
|
||||
module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
|
||||
AlertExample<span class="token punctuation">,</span>
|
||||
SimpleAlertExampleBlock<span class="token punctuation">,</span>
|
||||
<span class="token punctuation">}</span></div></div><div class="docs-prevnext"><a class="docs-next" href="alertios.html#content">Next →</a></div></div><noscript></noscript></section><footer class="wrap"><div class="center">© 2015 Facebook Inc.</div></footer></div><div id="fb-root"></div><script>
|
||||
<span class="token punctuation">}</span><span class="token punctuation">;</span></div></div><div class="docs-prevnext"><a class="docs-next" href="alertios.html#content">Next →</a></div></div><noscript></noscript></section><footer class="wrap"><div class="center">© 2015 Facebook Inc.</div></footer></div><div id="fb-root"></div><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
|
||||
+54
-86
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user