dual-input-component
v0.1.4
Published
Single switchable component for email and phone number (web & react-native support)
Downloads
2
Maintainers
Readme
#Dual Input Component 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 dual-input-component
Then use it in your app:
import React, { Component } from 'react';
import CustomInput from 'dual-input-component';
class App extends Component
{
handleChange=(value)=>{
console.log(value)
}
// => {dialCode: "+91"
parsedNumber: "+913528712361"
phoneNumber: "3528712361"}
render()
{
return (
<CustomInput
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.