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.

22 lines (21 loc) 740 B
import type { Signal } from '@preact/signals'; import { type ComponentChildren } from 'preact'; interface ApiStateProps { rootLegalEntityId: string; baseUrl: string; children?: ComponentChildren; } interface ApiState { rootLegalEntityId: Signal<string>; baseUrl: Signal<string>; } export declare const useApiContext: () => ApiState; /** * Creates and provides the apiState, which contains the baseUrl and the legalEntity * which are necessary toconstruct the url in API calls * * @param {string} legalEntityId - legalEntityId * @param {string} baseUrl - base url */ export declare const ApiProvider: ({ rootLegalEntityId, baseUrl, children }: ApiStateProps) => import("preact/jsx-runtime").JSX.Element; export {};