react-native-new-action-sheet
v1.0.1
Published
React Native Action Sheet for ios and android
Downloads
6
Maintainers
Readme
react-native-new-action-sheet
React Native Action Sheet module for android and ios
Instalation
yarn add react-native-new-action-sheet
You need it to link it manually if you are using react-native < 60.
How to use ?
import ActionSheet from 'react-native-new-action-sheet';
ActionSheet.showActionSheet(['Banana', 'Apple', 'Cancel'], (index) => {
// check that not cancel button was pressed in the action-sheet
if (index !== 2) {
console.log(`index:${index} was pressed`);
}
});
const params = Platform.OS === 'ios' ? {
subject: '',
message: 'Message to share',
} : {
url: '',
subject: '',
message: 'Message to share',
title: 'Share',
};
ActionSheet.showShareSheet(params);
Description
On IOS it's a wrapper on ActionSheetIOS. On Android it's a custom solution.