0.6.0 • Published 2 years ago

react-native-phone-input-component v0.6.0

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

react-native-phone-input-component

the phone input with flag button

Installation

npm install react-native-phone-input-component

Usage

import { PhoneInput } from "react-native-phone-input-component";

Examples

select countrysearch countrynormal and input customcustom container and input

Documentation

The props are the following:

containerStyle

  • Description: this is the styles for the container of the input and button
  • Type: StyleProp\
  • Default

    ```json 
      { 
        flexDirection: 'row',
        alignItems: 'center',
        height: 50,
      } 
    ```

    inputStyle

  • Description: this is the style for the input, you can change the style up to you.

  • Type: StyleProp\

    placeholder

  • Type: String

    returnKeyType

  • Description: When the keyboard pop up, there is button to hide it.

  • type: String

    onBlur

  • Type: (e: NativeSyntheticEvent) => void

    onFocus

  • Type: (e: NativeSyntheticEvent) => void

    onChangeText

  • Type: (text: string) => void

    placeholderTextColor

  • Type: String

    textAlign

  • Description: this is the text align for the input

  • Type: 'left' | 'center' | 'right'

    flagSelectorStyle

  • Description: the styles for the button, to show the modal to select the country

  • Type: StyleProp
  • Default:
    ```json 
      {
        height: '100%',
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#efecec',
        width: 50,
      }
    ```

    defaultCountry

  • Description: this is the default country that will be displayed, it must be on the two-letters format of the country
  • Type: String
  • Default: "us"

    errorStyle

  • Description: the style for the text that will be displayed when the user input an error

  • Type: StyleProp

    modalStyle

  • Description: the style for the modal to choose the country

  • Type: ViewStyle

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Thanks

Made with create-react-native-library

Flags provider

0.6.0

2 years ago

0.5.5

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago