tttstudios / react-native-otp-input

Tiny Javascript library which provides an elegant UI for user to input one time passcode.
MIT License
539 stars 242 forks source link

Refactor input placeholder based on DaniAkash's `test placeholder` PR. #45

Closed BeckyWu220 closed 4 years ago

BeckyWu220 commented 4 years ago

Based on DaniAkash's PR, refactored the logic to make sure the new feature is backward compatible. By default, hide the input placeholder. If only placeholder character is given, apply the same color with digit inputs. If both placeholder character and color are given, apply the placeholder color to placeholder text and display when input is empty.