I am using react-stripe-elements, but the readme doesn't explain how to add a custom font.
I have a container:
<StripeProvider apiKey={stripePubkey}>
<Elements>
<Checkout {...this.props} />
</Elements>
</StripeProvider>
And then inside my Checkout, I have a wrapper credit card input:
<form id="payment-form" onSubmit={this.onSubmit}>
<CreditCardInput />
</form>
And then my wrapper credit card input is:
<label>
Card info
<CardElement onChange={this.onCardChange} style={style} />
<div id="card-errors" role="alert">{this.state.error.message}</div>
</label>
The style that is passed into the <CardElement />
:
const style = {
base: {
color: '#232e35',
fontFamily: '"Podkova", "Courier New", serif',
fontSize: '16px',
'::placeholder': {
color: '#9ab4b0'
}
},
invalid: {
color: '#cf3100',
iconColor: '#cf3100'
}
};