react-native-contact-input
v0.1.9
Published
Single switchable component for email and phone number (web & react-native support)
Downloads
5
Maintainers
Readme
React-Native-Contact-Input
Single switchable component for email and phone number (web & react-native support) :globe_with_meridians::iphone:
Installation and usage
Install the package via npm
:
npm install --save react-native-contact-input
Then use it in your app:
import React, { Component } from 'react';
import ContactInput from 'react-native-contact-input';
class App extends Component
{
handleChange=(value)=>{
console.log(value)
}
// => {dialCode: "+91"
parsedNumber: "+913528712361"
phoneNumber: "3528712361"
isValid:true
}
render()
{
return (
<ContactInput
onChange={(value,state)=>this.handleChange(value)}
disableEmail={true}
style={{
width:200,
backgroundColor: 'white',
alignItems: 'center',
justifyContent: 'center',}}
/>
);
}
}
Props
##Contributing: All your suggestions and PRs are welcome.