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

Field layouts #20

Open
zeckdude opened this issue Jun 20, 2018 · 7 comments
Open

Field layouts #20

zeckdude opened this issue Jun 20, 2018 · 7 comments

Comments

@zeckdude
Copy link

Is the layout restricted to the exact order of the fields? I would like to put each of the input fields in a separate div and place the credit card icons in a different position. Is this possible with the current implementation? If not, what is the best way to go about using the code you wrote and changing it to suit my needs?

@jxom
Copy link
Contributor

jxom commented Jun 21, 2018

Hey @zeckdude,

Yes, the order is restricted to Card Number -> Expiry -> CVC and the layout is restricted to the one input wrapper.

However, it has been a thought of mine that this library should enable the input fields to be loosely coupled via their own components. I just haven’t had the time to work on it yet. It seems like this would be a recurring issue, so maybe I’ll implement it in my free time sometime soon. Feel free to open a PR if you wish though!

@zeckdude
Copy link
Author

zeckdude commented Jun 24, 2018

@jxom I’m actively working on it at the moment to work with my layout. I had to fork it and change the layout in the index.js file but if I can make it generic I will submit a PR.

Thanks!

@jxom
Copy link
Contributor

jxom commented Jun 24, 2018

👌

@jxom
Copy link
Contributor

jxom commented Aug 3, 2018

Hey @zeckdude, did you manage to get this happening? :D

@jxom
Copy link
Contributor

jxom commented May 26, 2019

We have just recently published a new library, React Payment Inputs which is a rewrite of react-credit-card-input, and fixes a lot of issues that were raised in this repository as well as a few extra enhancements.

Your issue that you raised here should be fixed in React Payment Inputs - however, if you wish to still use react-credit-card-inputs, I'll try find time to fix this issue in the future.

@zeckdude
Copy link
Author

@jxom thanks for the reply but i don’t think I ended up using it so don’t upgrade it on my part.

@james-meneses
Copy link

This is exactly what I was looking for, good to know there's this new libary that solves the problem, I'm gonna switch to it. Just commenting, in my case, i had some problems with the input in some mobile devices (such as Moto G), and as I needed to support a wide range of screen sizes, it was an important matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants