1"use strict";(self.webpackChunkreact_native_website=self.webpackChunkreact_native_website||[]).push([["14942"],{25100(e,t,n){n.r(t),n.d(t,{metadata:()=>s,default:()=>h,frontMatter:()=>l,contentTitle:()=>d,toc:()=>c,assets:()=>a});var s=JSON.parse('{"id":"alert","title":"Alert","description":"Launches an alert dialog with the specified title and message.","source":"@site/versioned_docs/version-0.81/alert.md","sourceDirName":".","slug":"/alert","permalink":"/docs/0.81/alert","draft":false,"unlisted":false,"editUrl":"[{\\"label\\":\\"Edit page for next release\\",\\"href\\":\\"https://github.com/facebook/react-native-website/edit/main/docs/alert.md\\"},{\\"label\\":\\"Edit page for 0.81 release\\",\\"href\\":\\"https://github.com/facebook/react-native-website/edit/main/website/versioned_docs/version-0.81/alert.md\\"}]","tags":[],"version":"0.81","lastUpdatedAt":1780494561000,"frontMatter":{"id":"alert","title":"Alert"},"sidebar":"api","previous":{"title":"AccessibilityInfo","permalink":"/docs/0.81/accessibilityinfo"},"next":{"title":"Animated","permalink":"/docs/0.81/animated"}}'),r=n(62540),i=n(43023);let l={id:"alert",title:"Alert"},d,a={},c=[{value:"Example",id:"example",level:2},{value:"iOS",id:"ios",level:2},{value:"Android",id:"android",level:2},{value:'Example <div class="label android">Android</div>',id:"example-android",level:3},{value:"Methods",id:"methods",level:2},{value:"<code>alert()</code>",id:"alert",level:3},{value:'<code>prompt()</code> <div class="label ios">iOS</div>',id:"prompt-ios",level:3},{value:"Type Definitions",id:"type-definitions",level:2},{value:'AlertButtonStyle <div class="label ios">iOS</div>',id:"alertbuttonstyle-ios",level:3},{value:'AlertType <div class="label ios">iOS</div>',id:"alerttype-ios",level:3},{value:"AlertButton",id:"alertbutton",level:3},{value:"AlertOptions",id:"alertoptions",level:3}];function o(e){let t={a:"a",code:"code",div:"div",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Launches an alert dialog with the specified title and message."}),"\n",(0,r.jsx)(t.p,{children:"Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button."}),"\n",(0,r.jsx)(t.p,{children:"This is an API that works both on Android and iOS and can show static alerts. Alert that prompts the user to enter some information is available on iOS only."}),"\n",(0,r.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(t.div,{className:"snack-player","data-snack-name":"Alert Example","data-snack-description":"Example usage","data-snack-files":"%7B%22App.tsx%22%3A%7B%22type%22%3A%22CODE%22%2C%22contents%22%3A%22import%20%7BStyleSheet%2C%20Button%2C%20Alert%7D%20from%20'react-native'%3B%5Cnimport%20%7BSafeAreaView%2C%20SafeAreaProvider%7D%20from%20'react-native-safe-area-context'%3B%5Cn%5Cnconst%20App%20%3D%20()%20%3D%3E%20%7B%5Cn%20%20const%20createTwoButtonAlert%20%3D%20()%20%3D%3E%5Cn%20%20%20%20Alert.alert('Alert%20Title'%2C%20'My%20Alert%20Msg'%2C%20%5B%5Cn%20%20%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20text%3A%20'Cancel'%2C%5Cn%20%20%20%20%20%20%20%20onPress%3A%20()%20%3D%3E%20console.log('Cancel%20Pressed')%2C%5Cn%20%20%20%20%20%20%20%20style%3A%20'cancel'%2C%5Cn%20%20%20%20%20%20%7D%2C%5Cn%20%20%20%20%20%20%7Btext%3A%20'OK'%2C%20onPress%3A%20()%20%3D%3E%20console.log('OK%20Pressed')%7D%2C%5Cn%20%20%20%20%5D)%3B%5Cn%5Cn%20%20const%20createThreeButtonAlert%20%3D%20()%20%3D%3E%5Cn%20%20%20%20Alert.alert('Alert%20Title'%2C%20'My%20Alert%20Msg'%2C%20%5B%5Cn%20%20%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20text%3A%20'Ask%20me%20later'%2C%5Cn%20%20%20%20%20%20%20%20onPress%3A%20()%20%3D%3E%20console.log('Ask%20me%20later%20pressed')%2C%5Cn%20%20%20%20%20%20%7D%2C%5Cn%20%20%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20text%3A%20'Cancel'%2C%5Cn%20%20%20%20%20%20%20%20onPress%3A%20()%20%3D%3E%20console.log('Cancel%20Pressed')%2C%5Cn%20%20%20%20%20%20%20%20style%3A%20'cancel'%2C%5Cn%20%20%20%20%20%20%7D%2C%5Cn%20%20%20%20%20%20%7Btext%3A%20'OK'%2C%20onPress%3A%20()%20%3D%3E%20console.log('OK%20Pressed')%7D%2C%5Cn%20%20%20%20%5D)%3B%5Cn%5Cn%20%20return%20(%5Cn%20%20%20%20%3CSafeAreaProvider%3E%5Cn%20%20%20%20%20%20%3CSafeAreaView%20style%3D%7Bstyles.container%7D%3E%5Cn%20%20%20%20%20%20%20%20%3CButton%20title%3D%7B'2-Button%20Alert'%7D%20onPress%3D%7BcreateTwoButtonAlert%7D%20%2F%3E%5Cn%20%20%20%20%20%20%20%20%3CButton%20title%3D%7B'3-Button%20Alert'%7D%20onPress%3D%7BcreateThreeButtonAlert%7D%20%2F%3E%5Cn%20%20%20%20%20%20%3C%2FSafeAreaView%3E%5Cn%20%20%20%20%3C%2FSafeAreaProvider%3E%5Cn%20%20)%3B%5Cn%7D%3B%5Cn%5Cnconst%20styles%20%3D%20StyleSheet.create(%7B%5Cn%20%20container%3A%20%7B%5Cn%20%20%20%20flex%3A%201%2C%5Cn%20%20%20%20justifyContent%3A%20'space-around'%2C%5Cn%20%20%20%20alignItems%3A%20'center'%2C%5Cn%20%20%7D%2C%5Cn%7D
1)%3B%5Cn%5Cnexport%20default%20App%3B%22%7D%7D","data-snack-dependencies":"react-native-safe-area-context","data-snack-platform":"web","data-snack-supported-platforms":"ios,android","data-snack-theme":"light","data-snack-preview":"true","data-snack-loading":"lazy","data-snack-device-appearance":"light","data-snack-device-frame":"false"}),"\n",(0,r.jsx)(t.h2,{id:"ios",children:"iOS"}),"\n",(0,r.jsxs)(t.p,{children:["On iOS you can specify any number of buttons. Each button can optionally specify a style or be emphasized, available options are represented by the ",(0,r.jsx)(t.a,{href:"#alertbuttonstyle-ios",children:"AlertButtonStyle"})," enum and the ",(0,r.jsx)(t.code,{children:"isPreferred"})," field on ",(0,r.jsx)(t.a,{href:"alert#alertbutton",children:"AlertButton"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"android",children:"Android"}),"\n",(0,r.jsx)(t.p,{children:"On Android at most three buttons can be specified. Android has a concept of a neutral, negative and a positive button:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"If you specify one button, it will be the 'positive' one (such as 'OK')"}),"\n",(0,r.jsx)(t.li,{children:"Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK')"}),"\n",(0,r.jsx)(t.li,{children:"Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK')"}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Alerts on Android can be dismissed by tapping outside of the alert box. It is disabled by default and can be enabled by providing an optional ",(0,r.jsx)(t.a,{href:"alert#alertoptions",children:"AlertOptions"})," parameter with the cancelable property set to ",(0,r.jsx)(t.code,{children:"true"})," i.e.",(0,r.jsx)("br",{}),(0,r.jsx)(t.code,{children:"{cancelable: true}"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The cancel event can be handled by providing an ",(0,r.jsx)(t.code,{children:"onDismiss"})," callback property inside the ",(0,r.jsx)(t.code,{children:"options"})," parameter."]}),"\n",(0,r.jsxs)(t.h3,{id:"example-android",children:["Example ",(0,r.jsx)("div",{className:"label android",children:"Android"})]}),"\n",(0,r.jsx)(t.div,{className:"snack-player","data-snack-name":"Alert Android Dissmissable Example","data-snack-description":"Example usage","data-snack-files":"%7B%22App.tsx%22%3A%7B%22type%22%3A%22CODE%22%2C%22contents%22%3A%22import%20%7BStyleSheet%2C%20Button%2C%20Alert%7D%20from%20'react-native'%3B%5Cnimport%20%7BSafeAreaView%2C%20SafeAreaProvider%7D%20from%20'react-native-safe-area-context'%3B%5Cn%5Cnconst%20showAlert%20%3D%20()%20%3D%3E%5Cn%20%20Alert.alert(%5Cn%20%20%20%20'Alert%20Title'%2C%5Cn%20%20%20%20'My%20Alert%20Msg'%2C%5Cn%20%20%20%20%5B%5Cn%20%20%20%20%20%20%7B%5Cn%20%20%20%20%20%20%20%20text%3A%20'Cancel'%2C%5Cn%20%20%20%20%20%20%20%20onPress%3A%20()%20%3D%3E%20Alert.alert('Cancel%20Pressed')%2C%5Cn%20%20%20%20%20%20%20%20style%3A%20'cancel'%2C%5Cn%20%20%20%20%20%20%7D%2C%5Cn%20%20%20%20%5D%2C%5Cn%20%20%20%20%7B%5Cn%20%20%20%20%20%20cancelable%3A%20true%2C%5Cn%20%20%20%20%20%20onDismiss%3A%20()%20%3D%3E%5Cn%20%20%20%20%20%20%20%20Alert.alert(%5Cn%20%20%20%20%20%20%20%20%20%20'This%20alert%20was%20dismissed%20by%20tapping%20outside%20of%20the%20alert%20dialog.'%2C%5Cn%20%20%20%20%20%20%20%20)%2C%5Cn%20%20%20%20%7D%2C%5Cn%20%20)%3B%5Cn%5Cnconst%20App%20%3D%20()%20%3D%3E%20(%5Cn%20%20%3CSafeAreaProvider%3E%5Cn%20%20%20%20%3CSafeAreaView%20style%3D%7Bstyles.container%7D%3E%5Cn%20%20%20%20%20%20%3CButton%20title%3D%5C%22Show%20alert%5C%22%20onPress%3D%7BshowAlert%7D%20%2F%3E%5Cn%20%20%20%20%3C%2FSafeAreaView%3E%5Cn%20%20%3C%2FSafeAreaProvider%3E%5Cn)%3B%5Cn%5Cnconst%20styles%20%3D%20StyleSheet.create(%7B%5Cn%20%20container%3A%20%7B%5Cn%20%20%20%20flex%3A%201%2C%5Cn%20%20%20%20justifyContent%3A%20'center'%2C%5Cn%20%20%20%20alignItems%3A%20'center'%2C%5Cn%20%20%7D%2C%5Cn%7D)%3B%5Cn%5Cnexport%20default%20App%3B%22%7D%7D","data-snack-dependencies":"react-native-safe-area-context","data-snack-platform":"web","data-snack-supported-platforms":"android","data-snack-theme":"light","data-snack-preview":"true","data-snack-loading":"lazy","data-snack-device-appearance":"light","data-snack-device-frame":"false"}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.h1,{id:"reference",children:"Reference"}),"\n",(0,r.jsx)(t.h2,{id:"methods",children:"Methods"}),"\n",(0,r.jsx)(t.h3,{id:"alert",children:(0,r.jsx)(t.code,{children:"alert()"})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-tsx",metastring:'title="React TSX"',children:"static alert (\n title: string,\n message?: string,\n buttons?: AlertButton[],\n options?: AlertOptions,\n);\n"})}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["title ",(0,r.jsx)("div",{className:"label basic required",children:"Required"})]}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsxs)(t.td,{children:["The dialog's title. Passing ",(0,r.jsx)(t.code,{children:"null"})," or empty string will hide the title."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"An optional message that appears below the dialog's title."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"buttons"}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.a,{href:"alert#alertbutton",children:"AlertButton"}),"[]"]}),(0,r.jsx)(t.td,{children:"An optional array containing buttons configuration."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"options"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"alert#alertoptions",children:"AlertOptions"})}),(0,r.jsx)(t.td,{children:"An optional Alert configuration."})]})]})]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsxs)(t.h3,{id:"prompt-ios",children:[(0,r.jsx)(t.code,{children:"prompt()"})," ",(0,r.jsx)("div",{className:"label ios",children:"iOS"})]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-tsx",metastring:'title="React TSX"',children:"static prompt: (\n title: string,\n message?: string,\n callbackOrButtons?: ((text: string) => void) | AlertButton[],\n type?: AlertType,\n defaultValue?: string,\n keyboardType?: string,\n);\n"})}),"\n",(0,r.jsx)(t.p,{children:"Create and display a prompt to enter some text in form of Alert."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["title ",(0,r.jsx)("div",{className:"label basic required",children:"Required"})]}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"The dialog's title."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"An optional message that appears above the text input."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"callbackOrButtons"}),(0,r.jsxs)(t.td,{children:["function",(0,r.jsx)("hr",{}),(0,r.jsx)(t.a,{href:"alert#alertButton",children:"AlertButton"}),"[]"]}),(0,r.jsxs)(t.td,{children:["If passed a function, it will be called with the prompt's value",(0,r.jsx)("br",{}),(0,r.jsx)(t.code,{children:"(text: string) => void"}),", when the user taps 'OK'.",(0,r.jsx)("hr",{}),"If passed an array, buttons will be configured based on the array content."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"type"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"alert#alerttype-ios",children:"AlertType"})}),(0,r.jsx)(t.td,{children:"This configures the text input."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"defaultValue"}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"The default text in text input."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"keyboardType"}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsxs)(t.td,{children:["The keyboard type of first text field (if exists). One of TextInput ",(0,r.jsx)(t.a,{href:"textinput#keyboardtype",children:"keyboardTypes"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"options"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"alert#alertoptions",children:"AlertOptions"})}),(0,r.jsx)(t.td,{children:"An optional Alert configuration."})]})]})]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.h2,{id:"type-definitions",children:"Type Definitions"}),"\n",(0,r.jsxs)(t.h3,{id:"alertbuttonstyle-ios",children:["AlertButtonStyle ",(0,r.jsx)("div",{className:"label ios",children:"iOS"})]}),"\n",(0,r.jsx)(t.p,{children:"An iOS Alert button style."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.th,{children:"Type"})})}),(0,r.jsx)(t.tbody,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.td,{children:"enum"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Constants:"})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Value"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"'default'"})}),(0,r.jsx)(t.td,{children:"Default button style."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"'cancel'"})}),(0,r.jsx)(t.td,{children:"Cancel button style."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"'destructive'"})}),(0,r.jsx)(t.td,{children:"Destructive button style."})]})]})]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsxs)(t.h3,{id:"alerttype-ios",children:["AlertType ",(0,r.jsx)("div",{className:"label ios",children:"iOS"})]}),"\n",(0,r.jsx)(t.p,{children:"An iOS Alert type."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.th,{children:"Type"})})}),(0,r.jsx)(t.tbody,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.td,{children:"enum"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Constants:"})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Value"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"'default'"})}
1),(0,r.jsx)(t.td,{children:"Default alert with no inputs"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"'plain-text'"})}),(0,r.jsx)(t.td,{children:"Plain text input alert"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"'secure-text'"})}),(0,r.jsx)(t.td,{children:"Secure text input alert"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"'login-password'"})}),(0,r.jsx)(t.td,{children:"Login and password alert"})]})]})]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.h3,{id:"alertbutton",children:"AlertButton"}),"\n",(0,r.jsx)(t.p,{children:"An object describing the configuration of a button in the alert."}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.th,{children:"Type"})})}),(0,r.jsx)(t.tbody,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.td,{children:"array of objects"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Objects properties:"})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text"}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"Button label."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"onPress"}),(0,r.jsx)(t.td,{children:"function"}),(0,r.jsx)(t.td,{children:"Callback function when button is pressed."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["style ",(0,r.jsx)("div",{className:"label ios",children:"iOS"})]}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.a,{href:"alert#alertbuttonstyle-ios",children:"AlertButtonStyle"})}),(0,r.jsx)(t.td,{children:"Button style, on Android this property will be ignored."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["isPreferred ",(0,r.jsx)("div",{className:"label ios",children:"iOS"})]}),(0,r.jsx)(t.td,{children:"boolean"}),(0,r.jsx)(t.td,{children:"Whether button should be emphasized, on Android this property will be ignored."})]})]})]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.h3,{id:"alertoptions",children:"AlertOptions"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.th,{children:"Type"})})}),(0,r.jsx)(t.tbody,{children:(0,r.jsx)(t.tr,{children:(0,r.jsx)(t.td,{children:"object"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Properties:"})}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["cancelable ",(0,r.jsx)("div",{className:"label android",children:"Android"})]}),(0,r.jsx)(t.td,{children:"boolean"}),(0,r.jsx)(t.td,{children:"Defines if alert can be dismissed by tapping outside of the alert box."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["userInterfaceStyle ",(0,r.jsx)("div",{className:"label ios",children:"iOS"})]}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsxs)(t.td,{children:["The interface style used for the alert, can be set to ",(0,r.jsx)(t.code,{children:"light"})," or ",(0,r.jsx)(t.code,{children:"dark"}),", otherwise the default system style will be used."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["onDismiss ",(0,r.jsx)("div",{className:"label android",children:"Android"})]}),(0,r.jsx)(t.td,{children:"function"}),(0,r.jsx)(t.td,{children:"Callback function fired when alert has been dismissed."})]})]})]})]})}function h(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},43023(e,t,n){n.d(t,{R:()=>l,x:()=>d});var s=n(63696);let r={},i=s.createContext(r);function l(e){let t=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.