Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Stripe.js theme selection #69

Open
crankycyclops opened this issue Oct 17, 2018 · 3 comments
Open

Stripe.js theme selection #69

crankycyclops opened this issue Oct 17, 2018 · 3 comments

Comments

@crankycyclops
Copy link

Is there, by any chance, a convenient way to choose between the dark, light, or light-outline themes mentioned in the Stripe.js reference? https://stripe.com/docs/stripe-js/reference

Thank you so much for your work on this! This module looks like it's going to be perfect for what I'm doing.

@pmclain
Copy link
Owner

pmclain commented Oct 17, 2018

Shouldn’t be hard to add a config option for this. I’ll try and include with the upcoming release fixing the invalid integer issue.

@crankycyclops
Copy link
Author

Thank you!

In the meantime, I'm looking into how I can access the stripeCard object defined in /src/view/frontend/web/js/view/payment/method-renderer/pmclain_stripe.js on line 54. If I can reference that (from outside your code), then I can dynamically change the theme as a stop gap until the next version of your module is released. However, I'm still struggling with require.js and am not sure how or if I can do that. If you have an idea off the top of your head for how I could do that without changing your module's code (I'd do so with code defined in my own theme), I would be very grateful. If not, I'll patiently wait for the next release :)

Thank you again!

@crankycyclops
Copy link
Author

I just realized I can copy that file over to my own theme for now in order to override it. I might have to maintain that through releases anyway, as I need to do more complicated custom styling to the elements than I originally thought.

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

No branches or pull requests

2 participants