1.0.0 • Published 3 years ago

@3beeepb/react-native-prompt v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

react-native-prompt npm version NPM npm.io

A cross-platform (iOS / Android) prompt component for React Native.

Add it to your project

  1. Run npm install @3beeepb/react-native-prompt --save

  2. Import the library

    import Prompt from '@3beeepb/react-native-prompt';
  3. Just use it like this:

    <Prompt
      titleText={'What is your name?'}
      onCancel={() => console.log('cancel')}
      onDone={() => console.log('done')}
    >
        <TextInput />
    </>

Properties

NameDescriptionType
titleTextTitle textstring
cancelTextCancel button textstring
doneTextDone button textstring
titleTextStyleTitle text stylesStyleSheet
cancelTextStyleCancel button text stylesStyleSheet
doneTextStyleDone button text styleStyleSheet
onCancelWill be called when a user press left (Cancel) button.() => void
onDoneWill 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.