react-native-promptmsg
This is an ios-style prompt dialog by react-native and support both Android and iOS.
Already integrated dependency
react-native-root-siblings
Install
$ npm install --save react-native-promptmsg
or
$ npm install --save https://github.com/RysisLiang/react-native-promptmsg.git
method and properties
AlertMsg.alert(data:Object, buttons:Array): RootSiblings
properties
- data
- title:(required)
- content:(optional)
- buttons(optional)
- text
- press
- renderItem: custom a single button
AlertMsg.alertByRender(func:Function): RootSiblings
- func:(optional)
AlertMsg.close(rs:RootSiblings): void
- rs:(optional)
Usage
default dialog of ios-style
; AlertMsg;
custom a single button
Clicked actions need to be passed along with the component.
; AlertMsg;
custom overall dialog of style
; AlertMsg
MIT Licensed