react-native-alert-dialogs

Simple alert dialogs for both plateform android and iOS

Usage no npm install needed!

<script type="module">
  import reactNativeAlertDialogs from 'https://cdn.skypack.dev/react-native-alert-dialogs';
</script>

README

Simple alert dialogs for both plateform android and iOS

Alerts

  1. DialogOkButton
  2. DialogWithTwoButtons

Installation

npm i react-native-alert-dialogs


Usage

  1. Dialog with simple ok button

import {DialogOkButton} from 'react-native-alert-dialogs';

<Button title="Sumbit" onPress={() => DialogOkButton('Success','Form submitted successfully')}/>

  1. Dialog with two buttons positive and negative

import {DialogWithTwoButtons} from 'react-native-alert-dialogs';

<Button title="Sign out" onPress={() => DialogWithTwoButtons( 'Confirm Logout', 'Are you sure want to logout?', 'Yes', 'No', () => { //do you actions on positive click}, () => { //do you actions on negative click} )} />