This package has been deprecated

Author message:

React Native Custom Alerts has moved to new organization: https://www.npmjs.com/package/@qeepsake/react-native-custom-alerts

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

1.0.2 • Public • Published

React Native Custom Alerts

This library provides the ability to define alerts which can be used all across an application. Instead of having a separate function for all these alerts, we can define them when the application starts and easily use them wherever we need them.

Install

 npm install react-native-custom-alerts

or

 yarn add react-native-custom-alerts

Usage

You need to register you alerts when the application starts.

import {CustomAlert} from 'react-native-custom-alerts';

CustomAlert.setup('my-custom-alert', 'Title', 'Message', buttons, options);
CustomAlert.setup('my-second-alert', 'Title', 'Message', buttons, options);

Now, you can place the alert you want to show elsewhere in your application.

import {CustomAlert} from 'react-native-custom-alerts';

CustomAlert.alert('my-second-alert');

Methods

setup()

static setup(name, title, message?, buttons?, options?)

alert()

static alert(name)

Authors

License

This project is licensed under the MIT License

Readme

Keywords

Package Sidebar

Install

npm i react-native-custom-alerts

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

4 kB

Total Files

6

Last publish

Collaborators

  • amogh-jrules
  • chestersim
  • lukebrandonfarrell
  • rodriigovieira
  • wahaheha