pmclain / module-stripe

Stripe Payments for Magento 2
Open Software License 3.0
47 stars 21 forks source link

Stripe.js theme selection #69

Open crankycyclops opened 5 years ago

crankycyclops commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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.