react-native-new-action-sheet

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i react-native-new-action-sheet

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

3.54 MB

Total Files

37

Last publish

Collaborators

  • vladimir.tkachenko