Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

placeholderTextColor #145

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Anurag Garg
Copyright (c) 2020 Daniel Martinez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 11 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@

<br>

<h1 align="center">React Native Phone Number Input
<h1 align="center">React Native Phone Number Input (Forked from @garganurag893)
</h1>

<h4 align="center">New feature includes placeholderTextColor
</h4>
<p align="center">Performance oriented React Native Phone Number Input with typings and proper validation for any country.
</p>

<h6 align="center">Made with ❤️ by developer for developers</h6>

<br>
<p align="center">
<img src="http://img.shields.io/travis/badges/badgerbadgerbadger.svg?style=flat-square" alt="build"/>
<img src="https://img.shields.io/github/issues/garganurag893/react-native-phone-number-input" alt="build"/>
<img src="https://img.shields.io/github/issues-pr/garganurag893/react-native-phone-number-input" alt="build"/>
<img src="https://img.shields.io/github/issues/coderpr0grammer/react-native-phone-number-input" alt="build"/>
<img src="https://img.shields.io/github/issues-pr/coderpr0grammer/react-native-phone-number-input" alt="build"/>
<img src="http://img.shields.io/:license-mit-blue.svg?style=flat-square" alt="build"/>
</p>

Expand Down Expand Up @@ -47,13 +48,13 @@
## Installation

```bash
$ yarn add react-native-phone-number-input
$ yarn add rn-phone-input-new
```

OR

```bash
$ npm i react-native-phone-number-input --save
$ npm i rn-phone-input-new --save
```

## Features
Expand All @@ -77,7 +78,7 @@ import {
TouchableOpacity,
Text,
} from "react-native";
import PhoneInput from "react-native-phone-number-input";
import PhoneInput from "rn-phone-input-new";
import { Colors } from "react-native/Libraries/NewAppScreen";

const App: React.FC = () => {
Expand Down Expand Up @@ -143,6 +144,7 @@ export default App;
- `disabled?`: boolean
- `disableArrowIcon?`: boolean
- `placeholder?`: string;
- `placeholderTextColor?`: string;
- `onChangeCountry?`: (country: Country) => void;
- `onChangeText?`: (text: string) => void;
- `onChangeFormattedText?`: (text: string) => void;
Expand Down Expand Up @@ -186,33 +188,19 @@ Upgrade `versions['Flipper'] ||= '~> 0.37.0'` in podfile.
- 🍴 Fork this repo!

- **Option 2**
- 👯 Clone this repo to your local machine using `https://github.com/garganurag893/react-native-phone-number-input`
- 👯 Clone this repo to your local machine using `https://github.com/coderpr0grammer/react-native-phone-number-input`

### Step 2

- **HACK AWAY!** 🔨🔨🔨

### Step 3

- 🔃 Create a new pull request using <a href="https://github.com/garganurag893/react-native-phone-number-input" target="_blank">`https://github.com/garganurag893/react-native-phone-number-input`</a>.
- 🔃 Create a new pull request using <a href="https://github.com/coderpr0grammer/react-native-phone-number-input" target="_blank">`https://github.com/coderpr0grammer/react-native-phone-number-input`</a>.

## Support

Reach out to me at one of the following places!

- Twitter at <a href="https://twitter.com/AnuragG94634191" target="_blank">https://twitter.com/AnuragG94634191</a>
- Medium at <a href="https://medium.com/@garganurag893" target="_blank">https://medium.com/@garganurag893</a>
- Instagram at <a href="https://www.instagram.com/the_only_anurag/" target="_blank">https://www.instagram.com/the_only_anurag/</a>
- Email at [email protected]

## License

[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

- **[MIT license](http://opensource.org/licenses/mit-license.php)**

## Hire

Looking for a React/React-Native Freelance Expert? Email at [email protected]

[react-native-country-picker-modal]: https://github.com/xcarpentier/react-native-country-picker-modal
4 changes: 3 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default class PhoneInput extends PureComponent {
textInputStyle,
autoFocus,
placeholder,
placeholderTextColor,
disableArrowIcon,
flagButtonStyle,
containerStyle,
Expand Down Expand Up @@ -222,8 +223,9 @@ export default class PhoneInput extends PureComponent {
<TextInput
style={[styles.numberText, textInputStyle ? textInputStyle : {}]}
placeholder={placeholder ? placeholder : "Phone Number"}
placeholderTextColor={placeholderTextColor ? placeholderTextColor : 'rgba(0,0,0,0.2)'}
onChangeText={this.onChangeText}
value={number}
value={this.props.value}
editable={disabled ? false : true}
selectionColor="black"
keyboardAppearance={withDarkTheme ? "dark" : "default"}
Expand Down
2 changes: 1 addition & 1 deletion lib/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const styles = StyleSheet.create({
},
codeText: {
fontSize: 16,
marginRight: 10,
marginRight: 0,
fontWeight: '500',
color: '#000000',
},
Expand Down
Loading