Gathering detailed insights and metrics for react-native-action-sheet
Gathering detailed insights and metrics for react-native-action-sheet
Gathering detailed insights and metrics for react-native-action-sheet
Gathering detailed insights and metrics for react-native-action-sheet
react-native-action-sheet-component
React Native Action Sheet Component for iOS & Android.
@expo/react-native-action-sheet
A cross-platform ActionSheet for React Native
react-native-action-sheet-aldy
react native action sheet
@gorhom/bottom-sheet
A performant interactive bottom sheet with fully configurable options 🚀
npm install react-native-action-sheet
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
183 Stars
74 Commits
53 Forks
5 Watching
12 Branches
12 Contributors
Updated on 10 Oct 2024
Java (41.61%)
Objective-C (30.55%)
JavaScript (14.33%)
Starlark (13.51%)
Cumulative downloads
Total Downloads
Last day
-35.9%
2,035
Compared to previous day
Last week
-4.4%
13,401
Compared to previous week
Last month
18.3%
60,627
Compared to previous month
Last year
18.5%
604,384
Compared to previous year
No dependencies detected.
React native action sheet with native android (using the built-in AlertDialog)
This module simply return the ActionSheetIOS if the device on iOS
iOS | Android |
---|---|
npm install react-native-action-sheet@latest --save
react-native link react-native-action-sheet
npm install @yfuks/react-native-action-sheet@0.0.3 --save
react-native link @yfuks/react-native-action-sheet
The react-native link
command above should do everything you need, but if for some reason it does not work, you can replicate its effects manually by making the following changes.
1// file: android/settings.gradle 2... 3 4include ':react-native-action-sheet' 5project(':react-native-action-sheet').projectDir = new File(settingsDir, '../node_modules/react-native-action-sheet/android')
1// file: android/app/build.gradle 2... 3 4dependencies { 5 ... 6 compile project(':react-native-action-sheet') 7}
1// file: android/app/src/main/java/com/<...>/MainApplication.java 2... 3 4import com.actionsheet.ActionSheetPackage; // <-- add this import 5 6public class MainApplication extends Application implements ReactApplication { 7 @Override 8 protected List<ReactPackage> getPackages() { 9 return Arrays.<ReactPackage>asList( 10 new MainReactPackage(), 11 new ActionSheetPackage() // <-- add this line 12 ); 13 } 14... 15} 16
You can change the style of the dialog by editing nodes_modules/react-native-action-sheet/android/src/main/res/values/style.xml
1import ActionSheet from 'react-native-action-sheet'; 2 3var options = [ 4 'Option 0', 5 'Option 1', 6 'Option 2', 7 'Delete', 8 'Cancel' 9]; 10 11var DESTRUCTIVE_INDEX = 3; 12var CANCEL_INDEX = 4; 13 14ActionSheet.showActionSheetWithOptions({ 15 options: options, 16 cancelButtonIndex: CANCEL_INDEX, 17 destructiveButtonIndex: DESTRUCTIVE_INDEX, 18 tintColor: 'blue' 19}, 20(buttonIndex) => { 21 console.log('button clicked :', buttonIndex); 22});
For the iOS implementation see ActionSheetIOS
1/** 2 * Display the native action sheet 3 */ 4 5static showActionSheetWithOptions(options, callback);
@note: on Android in case of a touch outside the ActionSheet or the hardware back button is pressed the buttonIndex value is cancelButtonIndex
or 'undefined'
option | iOS | Android | Info |
---|---|---|---|
options | OK | OK | (array of strings) - a list of button titles (required on iOS) |
cancelButtonIndex | OK | Ok | (int) - index of cancel button in options |
destructiveButtonIndex | OK | - | (int) - index of destructive button in options (same as above) |
title | OK | OK | (string) - a title to show above the action sheet |
message | OK | - | (string) - a message to show below the title |
tintColor | OK | - | (string) - a color to set to the text (defined by processColor) |
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 5/7 approved changesets -- score normalized to 7
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
68 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More