react-native-phone-with-flag
v1.1.0
Published
simple component that is used to get all flags near input field
Downloads
865
Maintainers
Readme
react-native-phone-with-flag
react-native-phone-with-flag is a plugin to get country flags on the left side of input component and can select any country flag from popup modal.
Getting started
$ npm install react-native-phone-with-flag --save
$ yarn add react-native-phone-with-flag
To use this dependency in your project, the following packages are needed.
- 'react'
- 'formik'
- 'yup'
- 'react-native-country-picker-modal'
- 'react-native-gesture-handler'
- 'react-native'
- 'native-base'
- '@expo/vector-icons'
Mostly automatic installation
Usage (Example of react-native-phone-with-flag )
import React, {Component} from 'react';
import {View} from 'react-native';
import PhoneNumberWithFlag from 'react-native-phone-with-flag';
/*
npm install react-native-phone-with-flag
*/
export default class App extends Component{
constructor(props){
super();
}
render(){
return (
<View style={{alignItems:"center",justifyContent:"center",flex:1}}>
<PhoneNumberWithFlag getNum={()=>{
//function to return data that is given as input.
}} placeHolder={'enter phone number'} />
</View>
);
}
}
// TODO: What to do with the module?
PhoneNumberWithFlag;
required Props and its datatypes :
placeHolder : '' or String
getNum : func() .returns data that is given in input field.
Credit goes to :
react, formik, yup, react-native-country-picker-modal ,react-native-gesture-handler, react-native, native-base, @expo/vector-icons
Contribution :
if you like my work 😀 u can contribute using vpa vpa : krishna.santho08@okaxis
it will be a great support to me ☺.