Library with credit card icons for Material-UI. Initially created for use in Universal Relay Boilerplate by Code Foundries.
Forked by Madwire for use in Payments, Backoffice, mm360v3front
, etc.
The package exports seven icon components in /lib
(six most common brands plus a generic), and a getCreditCardIconByName
helper function that can be used to dynamically choose an icon based on a prop coming from, e.g., a Stripe PaymentMethod.card
object.
Usage example: M360 Payments' CreditCardIcon component.
Make changes in src
, then run yarn compile
to transpile into lib
. This gets published in the GitHub Package Registry as @spacecraftinc/material-ui-credit-card-icons
.
- Package 3.3.0 works with projects that include
@material-ui/core
- Package 4.x works with projects that include
@mui/material