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.

49 lines (48 loc) 2.08 kB
import type { ApplyTarget, ConstrainTarget, GetSource, i18n, Namespace, SelectorFn, TFunction, TOptions } from 'i18next'; import type { ComponentType, HTMLProps, JSX, ReactNode } from 'preact/compat'; import { useTranslation as i18nUseTranslation } from 'react-i18next'; import type { _DefaultNamespace, _EnableSelector, $NoInfer, TransLegacy } from 'react-i18next/TransWithoutContext'; export declare const useTranslation: typeof i18nUseTranslation; /** * Modified to use Preact element types instead of React */ interface TransSelector { <Target extends ConstrainTarget<TOpt>, Key extends SelectorFn<GetSource<$NoInfer<Ns>, KPrefix>, ApplyTarget<Target, TOpt>, TOpt>, const Ns extends Namespace = _DefaultNamespace, KPrefix = undefined, TContext extends string | undefined = undefined, TOpt extends TOptions & { context?: TContext; } = { context: TContext; }, E = HTMLProps<HTMLDivElement>>(props: TransSelectorProps<Key, Ns, KPrefix, TContext, TOpt> & E): JSX.Element; } type TransChild = ReactNode | Record<string, unknown>; /** * Modified to use Preact element types instead of React */ interface TransSelectorProps<Key, Ns extends Namespace = _DefaultNamespace, KPrefix = undefined, TContext extends string | undefined = undefined, TOpt extends TOptions & { context?: TContext; } = { context: TContext; }> { children?: TransChild | readonly TransChild[]; components?: readonly JSX.Element[] | { readonly [tagName: string]: JSX.Element; }; count?: number; context?: TContext; defaults?: string; i18n?: i18n; i18nKey?: Key; ns?: Ns; parent?: string | ComponentType<any> | null; tOptions?: TOpt; values?: {}; shouldUnescape?: boolean; t?: TFunction<Ns, KPrefix>; } export declare const Trans: _EnableSelector extends true | "optimize" ? TransSelector : TransLegacy; export declare const addResourceBundles: (i18n: i18n, resourceDetails: { ns: Namespace; importFn: (lang: string) => Promise<{ default: Record<string, string>; }>; }[]) => void; export {};