1.0.0 • Published 6 years ago

react-native-intl-phone v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

React-Native-INTL-Phone-Input

It's a international phone input with phone mask.

npm.io

USAGE

install npm library

npm install react-native-intl-phone-input

İmport library

import IntlPhoneInput from 'react-native-intl-phone-input';

use component

  onChangeText = ({dialCode, unmaskedPhoneNumber, phoneNumber, isVerified}) => {
    console.log(dialCode, unmaskedPhoneNumber, phoneNumber, isVerified);
  };
  render() {
    return (
      <SafeAreaView>
        <PhoneInput onChangeText={this.onChangeText} defaultCountry="TR" />
      </SafeAreaView>
    );
  }
prop namestypedefault valuecomment
placeholderStringThis prop change the phone input placeholder
defaultCountryStringTRYou can change your default country code
onChangeTextFunctionThis function works when input text is changed
containerStyleStyleThis prop is about the text field's container style
dialCodeTextStyleStyle
flagStyleStyle
modalContainerStyleThis prop is about the modal field's SafeAreaView style.
filterInputStyleStyleThis prop is about the top of model filter text style
closeButtonStyleStyleThis prop is about text style of bottom modal
modalCountryItemCountryNameStyleStyle
filterTextStringFilterThis is the text of placeholder input of top modal
closeTextStringCLOSEThis prop is about the text of bottom modal