Skip to content

ElementProps

Props shared by every element component. options is required where the element needs one: cardCheckout for hostedCard, referenceNumber for payment and checkout.

export type ElementProps<T extends ElementType> = {
id?: string;
className?: string;
} & ElementEventProps<ElementEventsOf<T>> & ElementStatusProps<T> & ElementFinishedProps<T> & (object extends ElementOptionsMap[T] ? {
options?: ElementOptionsMap[T];
} : {
options: ElementOptionsMap[T];
});