react-native-alerter
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

  1. 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 the getPackages() method
  1. 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')
    
  2. 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 });

Package Sidebar

Install

npm i react-native-alerter

Weekly Downloads

17

Version

1.0.3

License

none

Unpacked Size

15.5 kB

Total Files

14

Last publish

Collaborators

  • sorokin0andrey