UNPKG

@chargebee/chargebee-js-react-wrapper

Version:
60 lines (59 loc) 1.88 kB
import * as React from 'react'; import { AdditionalData, AriaLabel, Callbacks, ChargebeeInstance, Classes, Fonts, PaymentIntent, Placeholder, Styles } from "@chargebee/chargebee-js-types"; interface ComponentContext { cbComponent: any; } export declare const ComponentContext: React.Context<ComponentContext>; export declare function getPropOptions(props: FieldContainerProps): { fonts: Fonts; classes: Classes; locale: string; style: Styles; showTestCards: boolean; placeholder: Placeholder; ariaLabel: AriaLabel; icon: boolean; currency: string; }; export interface FieldContainerProps { children?: React.ReactNode; type?: string; fonts?: Fonts; classes?: Classes; icon?: boolean; styles?: Styles; showTestCards?: boolean; locale?: string; placeholder?: Placeholder; currency?: string; ariaLabel?: AriaLabel; className?: string; onBlur?: React.MouseEventHandler; onChange?: React.ChangeEventHandler; onFocus?: React.FocusEventHandler; onReady?: React.EventHandler<React.SyntheticEvent>; onKeyPress?: Function; cbInstance?: any; } interface FieldContainerState { cbComponent: any; cbInstance: ChargebeeInstance; id: string; ready: boolean; } export default class FieldContainer extends React.Component<FieldContainerProps, FieldContainerState> { private id; private containerRef; constructor(props: FieldContainerProps); createCardComponent(): any; componentWillUnmount(): void; componentDidUpdate(prevProps: FieldContainerProps): void; componentDidMount(): void; tokenize(additionalData: AdditionalData): any; authorizeWith3ds(paymentIntent: PaymentIntent, additionalData: AdditionalData, callbacks: Callbacks): any; focus(): void; blur(): void; clear(): void; render(): JSX.Element; } export {};