@slashid/react
Version:
React SDK for the /id platform
23 lines (21 loc) • 988 B
TypeScript
import { JsonObject } from "@slashid/slashid";
export type OnboardingStepProps = {
id: string;
children: React.ReactNode;
beforeNext: (formValues: JsonObject) => Promise<void>;
};
/**
* Wrap any onboarding step with this component. It needs to have an ID.
* The order the steps are rendered is the order they will be displayed.
* Use OnboardingActions to render the controls that allow navigating the flow back and forth.
* If you want to store attributes as part of onboarding, follow this example:
*
* const { state, api } = useOnboarding();
const handleSubmit = async (formValues: JsonObject) => {
// store object as attributes
return api.updateAttributes(formValues);
};
Then pass this function as the beforeNext prop to the OnboardingStep component.
*/
export declare function OnboardingStep({ id, children, beforeNext, }: OnboardingStepProps): import("react/jsx-runtime").JSX.Element | null;
//# sourceMappingURL=onboarding-step.component.d.ts.map