@3beeepb/react-native-prompt
v1.0.0
Published
Cross Platform (iOS / Android) implementation of Prompt for React Native
Downloads
11
Maintainers
Readme
react-native-prompt
A cross-platform (iOS / Android) prompt component for React Native.
Add it to your project
Run
npm install @3beeepb/react-native-prompt --save
Import the library
import Prompt from '@3beeepb/react-native-prompt';
Just use it like this:
<Prompt titleText={'What is your name?'} onCancel={() => console.log('cancel')} onDone={() => console.log('done')} > <TextInput /> </>
Properties
| Name | Description | Type |
| --- | --- | --- |
| titleText
| Title text | string |
| cancelText
| Cancel button text | string |
| doneText
| Done button text | string |
| titleTextStyle
| Title text styles | StyleSheet |
| cancelTextStyle
| Cancel button text styles | StyleSheet |
| doneTextStyle
| Done button text style | StyleSheet |
| onCancel
| Will be called when a user press left (Cancel) button. | () => void
|
| onDone
| Will be called when a user press right (Done/OK) button. | () => void
|
Contribution
Please make sure to run the tests before proposing a PR by running npm test
.