You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.
I've been quite successful at styling the component to integrate it with styletron and Baseweb, but I'm not able to replicate styles for pseudo-classes so, with my current implementation I am not able to pass the correct styling to the parent... because of how styletron works. Here is how I implemented CardElement:
and here is how it looks next to a regular Baseweb component.
Probably my implementation is not correct, and I can achieve the desired result by simply hooking in the style prop of the CardElement itself, but I've not been successful that way. Any idea on how could I set styles for the container, so I can change settings for border, backgroundColor and transition on focus? Here is an example:
The text was updated successfully, but these errors were encountered:
I'm not familiar with styletron, but we have examples of styling the input on focus at https://stripe.dev/elements-examples/ that you can use as a guide.
Outside of that, if programmatically determining focus/blur can be useful (such that you can track the state yourself and adjust variables/classes/etc/ accordingly), there are events you can subscribe to: https://stripe.com/docs/stripe-js/reference#element-on
[edited reference to wrong user] @oliver-stripe That did the job, thank you for the tip! However, it would be great if you could expose some sort of api for the parent too, so these kind of things can be set easily without much overhead.
I've been quite successful at styling the component to integrate it with styletron and Baseweb, but I'm not able to replicate styles for pseudo-classes so, with my current implementation I am not able to pass the correct styling to the parent... because of how styletron works. Here is how I implemented
CardElement
:and here is how it looks next to a regular Baseweb component.
Probably my implementation is not correct, and I can achieve the desired result by simply hooking in the style prop of the CardElement itself, but I've not been successful that way. Any idea on how could I set styles for the container, so I can change settings for border, backgroundColor and transition on focus? Here is an example:
The text was updated successfully, but these errors were encountered: