diff --git a/apps/storybook/.storybook/main.js b/apps/storybook/.storybook/main.js index ae653ae06e..9b4c7f600c 100644 --- a/apps/storybook/.storybook/main.js +++ b/apps/storybook/.storybook/main.js @@ -15,6 +15,7 @@ module.exports = { "storybook-addon-rtl-direction", "storybook-react-i18next", "storybook-addon-next", + "storybook-addon-next-router", /*{ name: "storybook-addon-next", options: { diff --git a/apps/storybook/.storybook/preview.jsx b/apps/storybook/.storybook/preview.jsx index 5d8d9bdd0b..54057e8c3d 100644 --- a/apps/storybook/.storybook/preview.jsx +++ b/apps/storybook/.storybook/preview.jsx @@ -1,4 +1,5 @@ import { addDecorator } from "@storybook/react"; +import { AppRouterContext } from "next/dist/shared/lib/app-router-context"; import { I18nextProvider } from "react-i18next"; import "../styles/globals.css"; @@ -13,6 +14,13 @@ export const parameters = { date: /Date$/, }, }, + nextRouter: { + pathname: "/", + asPath: "/", + query: {}, + push() {}, + Provider: AppRouterContext.Provider, + }, }; addDecorator((storyFn) => ( diff --git a/apps/storybook/package.json b/apps/storybook/package.json index 992f702f81..5cc269a431 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -23,6 +23,7 @@ "next": "^13.4.6", "react": "^18.2.0", "react-dom": "^18.2.0", + "storybook-addon-next-router": "^4.0.2", "storybook-addon-rtl-direction": "^0.0.19" }, "devDependencies": { diff --git a/packages/ui/components/form/step/steps.stories.mdx b/packages/ui/components/form/step/steps.stories.mdx new file mode 100644 index 0000000000..4dd63af108 --- /dev/null +++ b/packages/ui/components/form/step/steps.stories.mdx @@ -0,0 +1,43 @@ +import { Canvas, Meta, Story } from "@storybook/addon-docs"; + +import { Title, VariantRow, VariantsTable, CustomArgsTable } from "@calcom/storybook/components"; + +import { Steps } from "./Steps"; + + + +