storybook/docs/snippets/common/storybook-storyloading-with-custom-object.ts.mdx
2023-01-19 17:59:38 +00:00

23 lines
655 B
Plaintext

```ts
// .storybook/main.ts
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-webpack5)
import type { StorybookConfig } from '@storybook/types';
const config: StorybookConfig = {
stories: [
{
// 👇 The directory field sets the directory your stories
directory: '../packages/stories',
// 👇 The titlePrefix field will generate automatic titles for your stories
titlePrefix: 'MyComponents',
// 👇 Storybook will load all files that contain the stories extension
files: '*.stories.*',
},
],
addons: ['@storybook/addon-essentials'],
};
export default config;
```