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.

15 lines (14 loc) 604 B
import type { MutableRef } from 'preact/hooks'; /** * Emits an event that can be listened to by the consumers * This means, for an event of 'complete' * - react/preact: `onComplete={handleIt}` * - vue: `@complete=(handleIt)` * - html: adyenComponent.addEventListener('complete', handleIt) * * @param ref a useRef result from inside the web-component * @param name event name, lowercase, eg: 'complete' * @param data data the consumer receives, like a payload * @returns */ export declare const emitAdyenSdkEvent: <Data>(ref: MutableRef<HTMLElement | null>, name: string, data?: Data) => void;