1.0.1 • Published 5 years ago

react-native-input-clonable v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

React Native Input Clonable

npm version Downloads

Create customizable inputs clonables.

Works with Android and iOS.

Demo

Alt Text

Installation

foo@bar:~$ npm install --save react-native-input-clonable

Usage

import MultipleTextInput from 'react-native-input-clonable';

// Your code here
<MultipleTextInput
  autoCapitalize={'none'}
  textInputPlaceholder='Email'
  textInputKeyboardType='email-address'
  textInputs={[{ text: 'first@gmail.com' }, { text: 'second@gmail.com' }]}
  onAdd={() => console.log("onAdd")}
  onRemove={(index) => console.log("onRemove", index)}
  onChangeText={(input, index) => console.log("onChangeText", input, index)}
  maxTextInput={10}
  inputStyle={{ fontSize: 14, width: 190 }}
/>

Props


proptypedefaultobs
autoCapitalizestringnone---
textInputPlaceholderstringnull---
textInputKeyboardTypestringnull---
textInputsarray{text: ""}Initial array of inputs. It should be in format {text: "Your input"}
onAddfunction() => {}Function invoked when a input was added
onRemovefunction(index) => {}Function invoked when a input has been removed. The callback function comes with index parameter
onChangeTextfunction(input, index) => {}Function invoked on some input change text. The callback function comes with input and index parameters
maxTextInputint3---
inputStyleobject{}---