bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
26 lines (25 loc) • 843 B
TypeScript
import { type Dispatch, type SetStateAction } from "react";
export type TStepsProps = {
children: any;
initialPath?: string[];
initialState?: any;
lastBack?: () => void;
[key: string]: any;
};
type TStepContext<T = any> = {
nextStep: (step: string) => () => void;
stepBack: () => void;
close: () => void;
state: T;
path: string[];
setState: Dispatch<SetStateAction<T>>;
};
export declare function Steps({ children, initialPath, initialState, lastBack }: TStepsProps): import("react/jsx-runtime").JSX.Element;
export declare function useStepContext<T = any>(): TStepContext<T>;
export declare function Step({ children, disabled, path, id, ...rest }: {
children: React.ReactNode;
disabled?: boolean;
id: string;
path?: string[];
}): import("react/jsx-runtime").JSX.Element;
export {};