@slashid/react
Version:
React SDK for the /id platform
18 lines • 1.01 kB
TypeScript
import { Factor } from "@slashid/slashid";
import { Handle, LoginOptions } from "../../domain/types";
import { CreateFlowOptions } from "../form/flow/flow.common";
type Props = {
className?: string;
onSuccess?: CreateFlowOptions["onSuccess"];
onError?: CreateFlowOptions["onError"];
getFactors: (handle?: Handle) => Promise<Factor[]> | Factor[];
middleware?: LoginOptions["middleware"];
};
/**
* This is a variant of the <Form> component that allows you to dynamically change the factor based on the handle that was used.
* The initial form will ask for a handle, and then the factor will be determined based on the handle that was entered.
* This behaviour is controlled by the `getFactor` prop - it receives the handle that was entered and should return the factor that should be used.
*/
export declare const DynamicFlow: ({ getFactors, className, onSuccess, onError, middleware, }: Props) => import("react/jsx-runtime").JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map