react-dynamic-stepper
Version:
Advanced and multi-feature react stepper component designed to be incredibly versatile for a variety of workflows and use cases.
66 lines (65 loc) • 1.71 kB
TypeScript
import { ReactNode } from 'react';
export interface FooterDataInterface {
prevBtn?: {
label?: string;
className?: string;
};
nextBtn?: {
label?: string;
className?: string;
};
submitBtn: {
label?: string;
className?: string;
onClickHandler: () => void | Promise<void>;
};
}
export interface PalletInterface {
default: string;
warning: string;
danger: string;
success: string;
disabled: string;
}
export interface StepInterface {
id?: string;
header: {
label: string;
indicator?: ReactNode;
isKeepIndicatorOnComplete?: boolean;
};
footer?: {
prevBtn?: {
label?: string;
className?: string;
};
nextBtn?: {
label?: string;
className?: string;
isPreventNextClick?: boolean;
onClickHandler?: () => void | Promise<void>;
};
};
content: ReactNode;
isLoading?: boolean;
isError?: boolean;
isWarning?: boolean;
isComplete: boolean;
}
export interface StepperInterface {
isRightToLeftLanguage?: boolean;
isVertical?: boolean;
isInline?: boolean;
isSequenceStepper?: boolean;
isStepConnector?: boolean;
disableStepHeaderClick?: boolean;
steps: StepInterface[];
footerData: FooterDataInterface;
pallet?: PalletInterface;
customConnector?: ReactNode;
}
export type StepperRef = {
navigateToStepByIndex: (index: number) => void;
navigateToStepById: (id: string) => void;
};
export declare const Stepper: import("react").ForwardRefExoticComponent<StepperInterface & import("react").RefAttributes<StepperRef>>;