Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 2x | import { ComponentType } from "react";
import {
AmexCardIcon,
DiscoverCardIcon,
MasterCardIcon,
VisaCardIcon,
} from "@assets/builderIcons";
type BrandIcon = ComponentType<{ width?: number; height?: number }>;
export interface CardBrand {
/** API field prefix / brand key (camelCase), e.g. "visa", "masterCard". */
key: string;
label: string;
/** Brand logo component; omitted for non-card buckets (ACH / Other). */
Icon?: BrandIcon;
}
/**
* Single source of truth for card-brand `key` ↔ `label` ↔ `icon`, so the
* API↔icon mapping isn't redefined per component. Order drives the
* Cost-Breakdown-by-Brand columns; the trailing "other" bucket (ACH / Other)
* has no logo.
*/
export const CARD_BRANDS: CardBrand[] = [
{ key: "visa", label: "Visa", Icon: VisaCardIcon },
{ key: "masterCard", label: "Mastercard", Icon: MasterCardIcon },
{ key: "discover", label: "Discover", Icon: DiscoverCardIcon },
{ key: "amEx", label: "Amex", Icon: AmexCardIcon },
{ key: "other", label: "ACH / Other" },
];
|