react-native-payment-card-icons
Version:
A collection of high-quality, customizable payment card brand icons (Visa, Mastercard, Maestro, Amex, and more) as React Native SVG components — fully compatible with React Native, Expo, and React Native Web for seamless cross-platform use.
21 lines (20 loc) • 622 B
JavaScript
;
import * as Icons from "./icons/index.js";
import { jsx as _jsx } from "react/jsx-runtime";
export function PaymentIcon({
type,
variant = 'flat',
...rest
}) {
const componentName = type.replace(/(^|-)(\w)/g, (_, __, c) => c.toUpperCase()) + variant.charAt(0).toUpperCase() + variant.slice(1);
const IconComponent = Icons[componentName];
if (!IconComponent) {
console.warn(`[PaymentIcon] Missing icon for type=${type} variant=${variant}`);
return null;
}
return /*#__PURE__*/_jsx(IconComponent, {
...rest
});
}
export default PaymentIcon;
//# sourceMappingURL=PaymentIcon.js.map