import { Check } from '@mui/icons-material' import clsx from 'clsx' import { ComponentType, ReactNode } from 'react' enum StepStatus { Past = 'past', Current = 'current', Future = 'future', } export type SteppedWalkthroughProps = { // Optional title of the walkthrough. title?: string // Optional description of the walkthrough. description?: string // Steps in the walkthrough. steps: { // Label for the step to display next to the step index. label: string // Optional content for the step. If not passed, only the label will be // displayed. The status refers to whether the step is in the past, is the // current step, or is a future step. content?: (status: `${StepStatus}`) => ReactNode // If passed, will override the default icon for the step. OverrideIcon?: ComponentType<{ className: string }> // Optional class names for the icon and its container. iconContainerClassName?: string iconClassName?: string // Optional statuses to override the default statuses to show the content // for. overrideShowStepContentStatuses?: `${StepStatus}`[] }[] // Index of the current step. stepIndex: number // Determines what step statuses the content should be shown for. Defaults to // only current. showStepContentStatuses?: `${StepStatus}`[] // Optional container class name. className?: string // Optional text class name, for the step number and step label. textClassName?: string } export const SteppedWalkthrough = ({ title, description, steps, stepIndex, showStepContentStatuses = [StepStatus.Current], className, textClassName = 'link-text', }: SteppedWalkthroughProps) => (
{title}
} {description && ({description}
)}{index + 1}.
{step.label}