import { Canvas, Meta, Story } from "@storybook/addon-docs"; import { Title, VariantRow, VariantsTable, CustomArgsTable } from "@calcom/storybook/components"; import { Steps } from "./Steps"; ## Definition Steps component is used to display the current step out of the total steps in a process. ## Structure The `Steps` component can be used to show the steps of the total in a process. <CustomArgsTable of={Steps} /> ## Steps Story <Canvas> <Story name="Steps" args={{ maxSteps: 4, currentStep: 2 }} argTypes={{ maxSteps: { control: "number" }, currentStep: { control: "number" } }}> {({ maxSteps, currentStep }) => ( <VariantsTable titles={["Default"]} columnMinWidth={150}> <VariantRow> <Steps maxSteps={maxSteps} currentStep={currentStep} navigateToStep={(step) => { const newPath = `?path=/story/ui-form-steps--steps&args=currentStep:${step + 1}`; window.open(newPath, "_self"); }} /> </VariantRow> </VariantsTable> )} </Story> </Canvas>