1.0.4 • Published 4 years ago

react-native-email-chip v1.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

react-native-email-chip

A simple and customizable React Native component that implements email chips.

Demo

npm.io

Installation

npm install react-native-email-chip

Example

import EmailChip from 'react-native-email-chip';
...
onChange = (emails) => {
  this.setState({ emails })
}
...
 <EmailChip
    emails={this.state.emails}
    onChange={this.onChange}
    // placeholder="Enter email"
    // placeholderTextColor="black"
    // chipContainerStyle={{backgroundColor:'white'}}
    // invalidChipContainerStyle={{backgroundColor:'red'}}
    // chipTextStyle={{color:'#000'}}
    // invalidChipTextStyle = {{color: 'white'}}
    // textInputStyles={{borderBottomWidth: 0}}
  />

Props

PropDescriptionTypeDefault
emailsAn array of email chips to be displayedArrayRequired
onChangeA handler to be called when array of email chips change.FunctionRequired
chipContainerStyleStyling override for container surrounding chipObject{{backgroundColor: '#d2d5dd'}}
invalidChipContainerStyleStyling override for container surrounding invalid chipObject{{backgroundColor: '#CC2D22'}}
chipTextStyleStyling override for chip textObject{{color: 'black'}}
invalidChipTextStyleStyling override for invalid chip textObject{{color: 'white'}}
textInputStylesStyling override for textinputObject{{borderBottomWidth : 1}}
placeholderCustom placeholder textString"Enter email"
placeholderTextColorStyling override for placeholder text colorString"grey"