Types

Shared TypeScript types for fields, payment methods, and theming.

ThemeVariables

See theming and appearance for usage.

type ThemeVariables = {
    colorPrimary?: string | null;
    colorBackground?: string | null;
    colorInput?: string | null;
    colorForeground?: string | null;
    colorMutedForeground?: string | null;
    colorPlaceholder?: string | null;
    colorBorder?: string | null;
    colorSuccess?: string | null;
    colorError?: string | null;
    focusRing?: string | null;
    shadow?: string | null;
    borderRadius?: string | null;
    fontFamily?: string | null;
    fontSize?: string | null;
};

PaymentMethodType

type PaymentMethodType = "card" | "us_bank_account";

FrameFieldType

type FrameFieldType =
    | "cardNumber"
    | "cardExpiry"
    | "cardCvc"
    | "bankAccountNumber"
    | "bankRoutingNumber";

ValueFieldType

type ValueFieldType = "country" | "postalCode" | "name" | "accountType";

ValueFieldStatus

type ValueFieldStatus<T = string> = {
    value: T;
    focused: boolean;
    valid: boolean;
    error: string | null;
};