phone-number-input-search
v0.1.3
Published
React Input Phone Number component
Downloads
10
Maintainers
Readme
phone-number-input-search
Phone Number Input With Flag ,Country Phone Code And Country Search component.
Install
npm install --save phone-number-input-search
Desktop Demo:
Usage
import React from "react";
import ReactPhoneInput from "phone-number-input-search";
class Example extends Component {
const [phone, setPhone] = React.useState(null); // the lifted state
const getPhoneNumberFun = (data) => { // the callback. Use a better name
console.log(data); // print phone number - to test
setPhone(data);
};
render() {
return (
<ReactPhoneInput getPhoneNumber={getPhoneNumberFun}/>
);
}
}
Props
| Property | Type | Default | Description |
| :------- | :----- | :----------------------------- | :--------------------------- |
| getPhoneNumber
| function | "() => {}" | Return phone number with code |
License
MIT © Nazeh-Taha