UNPKG

react-dynamic-stepper

Version:

Advanced and multi-feature react stepper component designed to be incredibly versatile for a variety of workflows and use cases.

71 lines (68 loc) 1.8 kB
import * as react from 'react'; import { ReactNode } from 'react'; interface FooterDataInterface { prevBtn?: { label?: string; className?: string; }; nextBtn?: { label?: string; className?: string; }; submitBtn: { label?: string; className?: string; onClickHandler: () => void | Promise<void>; }; } interface PalletInterface { default: string; warning: string; danger: string; success: string; disabled: string; } 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; } interface StepperInterface { isRightToLeftLanguage?: boolean; isVertical?: boolean; isInline?: boolean; isSequenceStepper?: boolean; isStepConnector?: boolean; disableStepHeaderClick?: boolean; steps: StepInterface[]; footerData: FooterDataInterface; pallet?: PalletInterface; customConnector?: ReactNode; } type StepperRef = { navigateToStepByIndex: (index: number) => void; navigateToStepById: (id: string) => void; }; declare const Stepper: react.ForwardRefExoticComponent<StepperInterface & react.RefAttributes<StepperRef>>; export { Stepper }; export type { FooterDataInterface, PalletInterface, StepInterface, StepperInterface, StepperRef };