0.2.7 • Published 5 years ago

react-native-troila-alert v0.2.7

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

react-native-troila-alert

Getting started

$ npm install react-native-troila-alert --save

Mostly automatic installation

$ react-native link react-native-troila-alert

Manual installation

iOS

  1. add pod 'RNTroilaAlert', :path => '../node_modules/react-native-troila-alert/ios/RNTroilaAlert.podspec' to your Pod file
  2. run pod install

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.troila.alert.RNTroilaAlertPackage; to the imports at the top of the file
  • Add new RNTroilaAlertPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-troila-alert'
    project(':react-native-troila-alert').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-troila-alert/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-troila-alert')
  3. add maven { url 'https://jitpack.io' } to your project level build.gradle

Usage

import CustomAlert from 'react-native-troila-alert';

CustomAlert.toast("test")
CustomAlert.toast("toast with success icon","success")

CustomAlert.showLoading("Loading...")
CustomAlert.hideLoading()

CustomAlert.alert("title","content","warning",[{text:"confirm",onPress:()=>console.log("confirm clicked")}])
0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.6

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.8

5 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

1.0.0

6 years ago