Skip to content

3beeepb/react-native-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-prompt npm version NPM

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

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.

About

A cross-platform prompt component for React Native.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published