@monei-js/components
Version:
MONEI UI Components enable you to collect sensitive payment information using customizable UI components.
52 lines (51 loc) • 1.43 kB
TypeScript
import { CSSObject } from '../../types/css';
export declare type CardInputStyle = {
base?: CSSObject;
invalid?: CSSObject;
input?: CSSObject;
cardNumber?: CSSObject;
expiryDate?: CSSObject;
cvc?: CSSObject;
icon?: CSSObject;
loading?: CSSObject;
};
export declare type CardInputOnChangeEvent = {
isTouched: boolean;
isSubmitted: boolean;
error?: string;
cardType?: string;
};
export declare type CardInputProps = {
ref?: any;
accountId?: string;
orderId?: string;
sessionId?: string;
paymentId?: string;
onError?: (error: any) => void;
onProps?: (cb: (props: CardInputProps) => void) => void;
onBlur?: () => void;
onChange?: (event: CardInputOnChangeEvent) => void;
onEnter?: () => void;
onFocus?: () => void;
onLoad?: () => void;
language?: string;
placeholders?: {
cardNumber?: string;
expiryDate?: string;
cvc?: string;
};
errorMessages?: {
emptyCardNumber?: string;
invalidCardNumber?: string;
emptyExpiryDate?: string;
monthOutOfRange?: string;
yearOutOfRange?: string;
dateOutOfRange?: string;
invalidExpiryDate?: string;
invalidCardType?: string;
emptyCVC?: string;
invalidCVC?: string;
};
style?: CardInputStyle;
innerStyle?: CardInputStyle;
};