You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're writing unattached documentation using MDX, you cannot customize the table of contents primarily due to the lack of support for defining parameters based on the current implementation. As a result, the table of contents will always revert to the default configuration provided globally.
This implies that it should work, just that you can't customize it, yet I don't see an auto-generated TOC? What am I missing?
Button.mdx
import { Canvas, Meta } from "@storybook/blocks";
import * as ButtonStories from "./Button.stories";
<Meta of={ButtonStories} />
# Button
Test
## Primary
<Canvas of={ButtonStories.Primary} />
## Secondary
<Canvas of={ButtonStories.Secondary} />
## Large
<Canvas of={ButtonStories.Large} />
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I'm trying to render a table of contents when using MDX, yet I'm not sure if this is just a limitation? According to the following: https://storybook.js.org/docs/writing-docs/autodocs#with-mdx-1
This implies that it should work, just that you can't customize it, yet I don't see an auto-generated TOC? What am I missing?
Button.mdx
Button.stories.ts
Additional information
main.ts
preview.ts
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions