1.1.0 • Published 5 years ago

react-native-prompt-android v1.1.0

Weekly downloads
3,818
License
MIT
Repository
github
Last release
5 years ago

react-native-prompt-android

A polyfill library for Alert.prompt on Android platform, working both on Android and iOS platform(iOS using AlertIOS.prompt)

Installation

  • Install from npm
npm i react-native-prompt-android --save
  • Link native library

You can use react-native-cli:

react-native link react-native-prompt-android

Or rnpm:

rnpm link react-native-prompt-android

Usage

import prompt from 'react-native-prompt-android';
prompt(
    'Enter password',
    'Enter your password to claim your $1.5B in lottery winnings',
    [
     {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},
     {text: 'OK', onPress: password => console.log('OK Pressed, password: ' + password)},
    ],
    {
        type: 'secure-text',
        cancelable: false,
        defaultValue: 'test',
        placeholder: 'placeholder'
    }
);

Props

namedescriptiontypedefault
typeText input type: 'numeric', 'secure-text', 'phone-pad', 'email-address'String'default'
cancelableBoolean
defaultValueDefault input valueString''
keyboardTypeThe keyboard type of first text field(if exists). One of 'default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter' or 'web-search'.String'default'
placeholderString''

Android Screen Shoot

Android Screen Shoot

1.1.0

5 years ago

1.0.0

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago