react-native-alerter
v1.0.3
Published
React Native truly native dropdown alert
Downloads
21
Maintainers
Readme
react-native-alerter
Getting started
$ yarn add react-native-alerter
Manual installation
iOS With CocoaPods
Add the following to your Podfile
and run pod update
:
pod 'RNAlerter', :path => '../node_modules/react-native-alerter'
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.sorokin0andrey.RNAlerterPackage;
to the imports at the top of the file - Add
new RNAlerterPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-alerter' project(':react-native-alerter').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-alerter/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-alerter')
Usage
import Alerter from 'react-native-alerter';
Alerter.show({ title: 'Hello word!', 'Message...', backgroundColor: '#424543', duration: 4000 });