Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-amazon-modal-picker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-amazon-modal-picker

Amazon style inspired selection modal for React Native

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-amazon-modal-picker

npm npm licence npm downloads

React Native selection modal inspired by Amazon's mobile application modal.

Install

To get started install via npm:

 npm install react-native-amazon-modal-picker --save

Usage

To use in React Native. Import:

 import ModalSelect from 'react-native-amazon-modal-picker';

Then add it to your code:

<ModalSelect
  isVisible={this.state.modalOpen}
  title='Selector'
  labels={[...Array(30).keys()]}
  onSelect={(value) => {
    this.setState({ modalValue: value, modalOpen: false }); //<- Closes Modal and sets value
  }}
  headerColor='#6e2ccd' />

Props

PropTypeOptionalDefaultDescription
isVisibleboolNofalseIs the modal visible?
onSelectfuncNoFunction which gets called when a option is pressed. Value passed as parameter.
titlestringYes'Select'Tile of modal
labelsarrayNoArray of labels to render in modal
valuesarrayYesCustom values to pass to onSelect when item is clicked. Must be equal length to labels
headerColorstringYes'#CD2C2E'Colour of header

Todo

  • Use ListView to render items in modal instead of ScrollView

Contributing

If you want to issue a PR, go ahead ;)

Authors

License

This project is licensed under the MIT License

Keywords

FAQs

Package last updated on 12 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc