0.0.3 • Published 10 months ago

@mankin/react-native-alert v0.0.3

Weekly downloads
-
License
-
Repository
github
Last release
10 months ago

@mankin/react-native-alert

Fork from: shimohq/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 install @mankin/react-native-alert --save

Usage

import Alert from '@mankin/react-native-alert'

Alert.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

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago