Skip to content

heavyskyl/react-native-new-action-sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-new-action-sheet

React Native Action Sheet module for android and ios

Instalation

yarn add react-native-new-action-sheet

You need to link it manually on android 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.

About

React Native Action Sheet module for android and ios

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published