react-wizard-onboarding
Version:
Pretty fancy onboarding wizard for your website, made in React.
51 lines (50 loc) • 1.26 kB
TypeScript
import { default as React, ReactNode } from 'react';
interface TutorialComponentData {
id: string;
position: number;
text?: string;
image?: string;
tutorialKey: string;
}
interface TutorialConfiguration {
title?: string;
sticky?: boolean;
hideArrowOnSticky?: boolean;
darkMode?: boolean;
displayDots?: boolean;
labels?: {
next?: string;
complete?: string;
close?: string;
};
icons?: {
next?: ReactNode;
complete?: ReactNode;
close?: ReactNode;
};
}
export default function useTutorial(): {
registerTutorialComponent: (componentData: TutorialComponentData) => (element: any) => void;
startTutorial: (tutorialKey?: string) => void;
};
export declare const createTutorialConfig: (configurations: TutorialConfiguration) => {
sticky: boolean;
darkMode: boolean;
displayDots: boolean;
hideArrowOnSticky: boolean;
labels: {
next?: string;
complete?: string;
close?: string;
};
icons: {
next?: ReactNode;
complete?: ReactNode;
close?: ReactNode;
};
};
export declare const TutorialProvider: React.FC<{
children: ReactNode;
config: TutorialConfiguration;
}>;
export {};