storybook/docs/_snippets/storybook-preview-enable-toc.md
2024-06-13 17:53:08 +01:00

26 lines
550 B
Markdown

```js filename=".storybook/preview.js" renderer="common" language="js"
export default {
parameters: {
docs: {
toc: true, // 👈 Enables the table of contents
},
},
};
```
```ts filename=".storybook/preview.ts" renderer="common" language="ts"
// Replace your-framework with the framework you are using (e.g., react, vue3)
import { Preview } from '@storybook/your-framework';
const preview: Preview = {
parameters: {
docs: {
toc: true, // 👈 Enables the table of contents
},
},
};
export default preview;
```