react-native-prompt-android
Advanced tools
Comparing version
@@ -75,3 +75,16 @@ import { | ||
): void { | ||
let buttons = callbackOrButtons; | ||
const defaultButtons = [ | ||
{ | ||
text: 'Cancel', | ||
}, | ||
{ | ||
text: 'OK', | ||
onPress: callbackOrButtons | ||
} | ||
]; | ||
let buttons = typeof callbackOrButtons === 'function' | ||
? defaultButtons | ||
: callbackOrButtons; | ||
let config = { | ||
@@ -82,9 +95,2 @@ title: title || '', | ||
if (typeof callbackOrButtons === 'function') { | ||
buttons.push({ | ||
text: 'OK', | ||
onPress: callbackOrButtons | ||
}); | ||
} | ||
if (options) { | ||
@@ -91,0 +97,0 @@ config = { |
{ | ||
"name": "react-native-prompt-android", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Polyfill for Alert.prompt on Android", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
527
1.15%49270
-35.7%21
-30%