react-native-international-phone-number 0.4.9 → 0.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,7 +47,8 @@
47
47
  - [Customizing Lib](#customizing-lib)
48
48
  - [Dark Mode](#dark-mode)
49
49
  - [Custom Lib Styles](#custom-lib-styles)
50
- - [Disabled Mode](#disabled-mode)
50
+ - [Phone Input Disabled Mode](#phone-input-disabled-mode)
51
+ - [Country Modal Disabled Mode](#country-modal-disabled-mode)
51
52
  - [Custom Disabled Mode Style](#custom-disabled-mode-style)
52
53
  - [Lib Props](#props)
53
54
  - [Lib Functions](#functions)
@@ -467,7 +468,7 @@ export default function App() {
467
468
  />
468
469
  ```
469
470
 
470
- - ### Disabled Mode:
471
+ - ### Phone Input Disabled Mode:
471
472
 
472
473
  ```jsx
473
474
  <PhoneInput
@@ -476,6 +477,15 @@ export default function App() {
476
477
  />
477
478
  ```
478
479
 
480
+ - ### Country Modal Disabled Mode:
481
+
482
+ ```jsx
483
+ <PhoneInput
484
+ ...
485
+ modalDisabled
486
+ />
487
+ ```
488
+
479
489
  - ### Custom Disabled Mode Style:
480
490
 
481
491
  ```jsx
@@ -492,7 +502,7 @@ export default function App() {
492
502
 
493
503
  </br>
494
504
 
495
- ## Props
505
+ ## Component Props ([PhoneInputProps](https://github.com/AstrOOnauta/react-native-international-phone-number/blob/master/lib/interfaces/phoneInputProps.ts))
496
506
 
497
507
  - `defaultValue?:` string;
498
508
  - `value:` string;
@@ -500,6 +510,7 @@ export default function App() {
500
510
  - `selectedCountry:` undefined | [ICountry](https://github.com/AstrOOnauta/react-native-international-phone-number/blob/master/lib/interfaces/country.ts);
501
511
  - `onChangeSelectedCountry:` (country: [ICountry](https://github.com/AstrOOnauta/react-native-international-phone-number/blob/master/lib/interfaces/country.ts)) => void;
502
512
  - `disabled?:` boolean;
513
+ - `modalDisabled?:` boolean;
503
514
  - `withDarkTheme?:` boolean;
504
515
  - `containerStyle?:` StyleProp<[ViewStyle](https://reactnative.dev/docs/view-style-props)>;
505
516
  - `flagContainerStyle?:` StyleProp<[ViewStyle](https://reactnative.dev/docs/view-style-props)>;
package/lib/index.js CHANGED
@@ -26,6 +26,7 @@ function PhoneInput({
26
26
  inputStyle,
27
27
  withDarkTheme,
28
28
  disabled,
29
+ modalDisabled,
29
30
  defaultValue,
30
31
  onChangePhoneNumber,
31
32
  selectedCountry,
@@ -171,7 +172,9 @@ function PhoneInput({
171
172
  countryCode={
172
173
  selectedCountry ? selectedCountry.cca2 : defaultCca2
173
174
  }
174
- modalProps={disabled ? { visible: false } : {}}
175
+ modalProps={
176
+ disabled || modalDisabled ? { visible: false } : {}
177
+ }
175
178
  />
176
179
  <TextInput
177
180
  style={[
@@ -15,6 +15,7 @@ export interface PhoneInputProps extends TextInputProps {
15
15
  inputStyle?: StyleProp<TextStyle>;
16
16
  withDarkTheme?: boolean;
17
17
  disabled?: boolean;
18
+ modalDisabled?: boolean;
18
19
  defaultValue?: string;
19
20
  value: string;
20
21
  onChangePhoneNumber: (phoneNumber: string) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-international-phone-number",
3
3
  "author": "AstrOOnauta (https://github.com/AstrOOnauta)",
4
- "version": "0.4.9",
4
+ "version": "0.4.11",
5
5
  "description": "International mobile phone input component with mask for React Native",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",