Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

LorenzoScebba/vitejs-storybook-example

Repository files navigation

ViteJS Storybook example

  • Create project with yarn create vite <name> --template react-ts
  • Run npx sb init --builder @storybook/builder-vite
  • Delete all extra files created under src/
  • Run npm run storybook or yarn storybook

If you need any providers to wrap all stories add the following in .storybook/preview.jsx

export const decorators = [
    (Story) => (
        <ThemeProvider theme={theme}>
          <Story />
        </ThemeProvider>
    ),
];

About

A short example on how to use @storybookjs with @vitejs

Topics

Resources

Stars

Watchers

Forks