File tree 1 file changed +6
-24
lines changed
1 file changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -10,40 +10,22 @@ This comprehensive toolkit features custom hooks and utility functions tailored
10
10
and validation. It supports international standards, making it suitable for phone number processing applications across
11
11
different countries and regions.
12
12
13
- ## Features
13
+ ## Usage
14
14
15
- - Build a phone number input component with a country selector.
16
- - Parse the phone metadata and validate phone numbers.
17
- - Format raw phone numbers into a more readable format and the opposite .
15
+ This library can be used to build a phone number input component with a country selector for React applications. As well
16
+ as to parse the phone metadata, validate phone numbers, format raw phone numbers into a more readable format and the
17
+ opposite. You can use the [ development ] ( ./development ) to test and develop your own components .
18
18
19
19
### useMask
20
20
21
21
``` jsx
22
+ import {useMask } from " react-phone-hooks" ;
23
+
22
24
const PhoneInput = (props ) => {
23
25
return < input {... useMask (" +1 (...) ... ...." )} {... props}/ >
24
26
}
25
27
```
26
28
27
- ### usePhone
28
-
29
- ``` javascript
30
- const {
31
- value ,
32
- pattern ,
33
- metadata ,
34
- setValue ,
35
- countriesList ,
36
- } = usePhone ({
37
- query,
38
- country,
39
- countryCode,
40
- initialValue,
41
- onlyCountries,
42
- excludeCountries,
43
- preferredCountries,
44
- })
45
- ```
46
-
47
29
## Contribute
48
30
49
31
Any contribution is welcome. Don't hesitate to open an issue or discussion if you have questions about your project's
You can’t perform that action at this time.
0 commit comments