@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) • 591 B
TypeScript
import type { TargetedKeyboardEvent } from 'preact';
/**
* This is useful for when you want to figure out what effect a keyboard event would have on
* some arbitrary existing text, as if it were happening on an `<input>`'s value.
*
* This is not a perfect simulation, real input handling is much more complex.
*
* @param keyDownEvent the actual event which occurred, probably on some other element
* @param value the existing value of the input
*/
export declare const simulateTextChangeFromKeyboardEvent: (keyDownEvent: TargetedKeyboardEvent<HTMLElement>, value: string) => string;