New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-amount-input

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-amount-input

React Native JS-only amount (decimal) input component

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

react-native-amount-input

npm package CircleCI Status Supports iOS MIT License code style: prettier

React Native JS-only amount (decimal) input component. Optimized for iOS.

Getting started

$ npm install react-native-amount-input --save

Usage

Import AmountInput and use it more or less like the regular TextInput component from React Native core.

import {AmountInput} from 'react-native-amount-input';

function MyComponent() {
  return (
    <View>
      <AmountInput
        currency="USD"
        defaultQuantity={defaultQuantity}
        onChangeQuantity={handleChangeQuantity}
      />
    </View>
  );
}

API

In addition to the regular TextInput props, you can also provide the following props for extra customization:

Props

Reference

Props

currency

Sets the currency for a fixed symbol prefix in the text input box. Has to be a ISO 4217 currency code.

TypeRequired
stringNo

defaultQuantity

Provides an initial value that will change when the user starts typing.

TypeRequired
numberNo

onChangeQuantity

Callback that is called when the entered quantity changes. Changed quantity is passed as a single string argument to the callback handler.

TypeRequired
number => voidNo

TextInputComponent

Sets the base text input component.

TypeRequired
typeof TextInputNo

License

MIT License © Alka, Inc

Keywords

react native

FAQs

Package last updated on 30 Jul 2019

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