thegamenicorus / react-native-phone-input

Phone input box for React Native
https://www.npmjs.com/package/react-native-phone-input
MIT License
394 stars 447 forks source link

How can I style TextComponent Wrapper? #49

Open wzup opened 6 years ago

wzup commented 6 years ago

How can I add styles to this component? https://github.com/thegamenicorus/react-native-phone-input/blob/master/lib/index.js#L181

I need to have the following styles:

{
    // default
    flex:1;
    marginLeft:10;

    // my custom styles
    minHeight:36;
    alignItems:flex-start;
    justifyContent:center; 
}
goodok21 commented 5 years ago

Use textComponnent prop or pass props to TextComponent via textProps.

<PhoneInput textComponent={CustomTextComponent} />

or

<PhoneInput textProps={{ ...styles.text }} />