Skip to content

Instantly share code, notes, and snippets.

@ericnicolaas
Created March 25, 2022 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericnicolaas/a083ba98c1770b674ac0e5abe53b534e to your computer and use it in GitHub Desktop.
Save ericnicolaas/a083ba98c1770b674ac0e5abe53b534e to your computer and use it in GitHub Desktop.
Customize the card field in Charitable Stripe using the Style object
window.Charitable.Hooks.addFilter( 'stripeCardElementOptions', 'myCustom', () => {
return {
style: {
base: {
iconColor: '#c4f0ff',
color: '#444',
fontWeight: '500',
fontFamily: 'Roboto, Open Sans, Segoe UI, sans-serif',
fontSize: '16px',
fontSmoothing: 'antialiased',
':-webkit-autofill': {
color: '#fce883',
},
'::placeholder': {
color: '#87BBFD',
},
},
invalid: {
iconColor: '#532142',
color: '#532142',
},
},
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment