A react component to format phone numbers
npm install react-phone-input``shell-script`
npm install react-phone-input --save
Usage:
`jsx`
React.render(
document.getElementById('content'));
Your handler for the onChange event should expect a string as
parameter, where the value is that of the entered phone number. For example:
`jsx``
function handeOnChange(value) {
this.setState({
phone: value
});
}
| Name | Description |
| :------------- | :----------- |
| defaultCountry | country code to initialize the component|
| excludeCountries | array of country codes to be excluded e.g. ['cu','cw','kz']|
| onlyCountries | array of country codes to be included e.g. ['cu','cw','kz']|
| preferredCountries | array of country codes to be preferred (highlighted at the top) e.g. ['cu','cw','kz']|