UNPKG

@olo/pay-react-native

Version:
46 lines (42 loc) 1.45 kB
// Copyright © 2022 Olo Inc. All rights reserved. // This software is made available under the Olo Pay SDK License (See LICENSE.md file) import type { NativeSyntheticEvent, ViewProps } from 'react-native'; import type { CardDetails, CardField, CustomErrorMessages, FontWeight, PaymentCardDetailsPlaceholders, PaymentMethodResult, } from '../../definitions'; export interface FocusFieldDetails { field: CardField; } export interface PaymentCardDetailsNativeViewStyles { backgroundColor?: string; borderColor?: string; borderWidth?: number; cornerRadius?: number; cursorColor?: string; fontFamily?: string; fontSize?: number; placeholderColor?: string; textColor?: string; errorTextColor?: string; textPaddingLeft?: number; textPaddingRight?: number; fontWeight?: FontWeight; italic?: boolean; } export interface CardDetailsNativeProps extends ViewProps { cardStyles?: PaymentCardDetailsNativeViewStyles; customErrorMessages?: CustomErrorMessages; isEnabled?: boolean; placeholders?: PaymentCardDetailsPlaceholders; postalCodeEnabled?: boolean; onBlurEvent(event: NativeSyntheticEvent<void>): void; onCardChangeEvent(event: NativeSyntheticEvent<CardDetails>): void; onFocusEvent(event: NativeSyntheticEvent<void>): void; onFocusFieldEvent(event: NativeSyntheticEvent<FocusFieldDetails>): void; onPaymentMethodResultEvent?(event: NativeSyntheticEvent<PaymentMethodResult>): void; }