UNPKG

@adyen/kyc-components

Version:

This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.

12 lines (11 loc) 733 B
import type { ActionType, UserEvents } from '../../core/user-events'; /** * Creates a click handler that automatically logs an analytics event before executing the provided handler function. * * @param userEvents - The UserEvents instance from the analytics context. * @param label - The label describing the button or element being clicked. * @param action - The type of action performed. * @param handler - The actual function to execute when the click occurs. * @returns A higher-order function that handles the click, logs the event, and calls the original handler. */ export declare const trackClickHandler: (userEvents: UserEvents, label: string, action: ActionType, handler: () => void | Promise<void>) => () => void;