0.1.2 • Published 3 months ago
ern-phone-input v0.1.2
ern-phone-input
Installation
npm:
npm i ern-phone-input
yarn:
yarn add ern-phone-input
Props:
In addition to the here listed Props you can pass all other properties that can be used on a normal Html input field
Code example:
import React, { useState } from 'react'
import { PhoneInput, PhoneNumber } from 'react-phonenr-input';
const Example = () => {
const [value, setValue] = useState<PhoneNumber>('')
const handleChange = (phoneNumber: PhoneNumber) => {
// Do something with the phoneNumber
setValue(phoneNumber)
}
return (
<div>
<PhoneInput onChange={handleChange}/>
</div>
)
}
Support
If you like the project and want to support me, you can buy me a coffee :)