Quantcast
Channel: How can I style a Stripe Elements input with Bootstrap? - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by Sanan Ali for How can I style a Stripe Elements input with Bootstrap?

$
0
0

I was using stripe with react and I was trying to use classes on parent container but it wasn't working for me. So, I ended up using inline styles for containers.Here is the final code that worked for me.

const containerStyles = {border: '1px solid #d3d3d3',padding: '5px 10px 5px 10px',borderRadius: '4px',width: '100%', };const cardNumberElementOptions = {style: {  base: {    fontSize: '14px',    lineHeight: '45px',  },},placeholder: 'Card Number',};<div style={containerStyles}><CardNumberElement options={cardNumberElementOptions} /></div>

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>