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.

54 lines (51 loc) 1.53 kB
import * as react from 'react'; import { ReactNode } from 'react'; interface FooterDataInterface { prevBtnLabel?: string; prevBtnClassName?: string; nextBtnLabel?: string; nextBtnClassName?: string; submitBtnLabel?: string; submitBtnClassName?: string; submitHandler: () => void | Promise<void>; } interface PalletInterface { default: string; warning: string; danger: string; success: string; disabled: string; } interface StepInterface { header: { label: string; indicator?: ReactNode; isKeepIndicatorOnComplete?: boolean; }; footer?: { nextButtonLabel?: string; prevButtonLabel?: 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; steps: StepInterface[]; footerData: FooterDataInterface; pallet?: PalletInterface; } type NavigateToStepHandler = { navigateToStep: (index: number) => void; }; declare const Stepper: react.ForwardRefExoticComponent<StepperInterface & react.RefAttributes<NavigateToStepHandler>>; export { type FooterDataInterface, type NavigateToStepHandler, type PalletInterface, type StepInterface, Stepper, type StepperInterface };