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
I want to have unattached doc pages in mdx with "overview tables" like this:
...docs...
|| small | medium | large ||--------|:-----:|:------:|:-----:|| icon-a | Story | Story | Story || icon-b | ... | ... | ... || icon-c | ... | ... | ... |
...more docs...
The problem is that some of these components have a theme="light" | "dark" arg and I'd like to be able to showcase that mode too in the same table. My first idea was to add the <Controls> doc block, filter out everything except the theme arg and let users toggle it manually, but I have to assign it to a single story and only that one will change. Is there any way of making the arg table affect many stories at once? Or any other way of having an UI element that lets me toggle this propery live on mdx docs?
Having an entire second table in the opposite mode would work for me too, but that would mean either writing another set of stories in dark mode, or finding a way of overriding this prop when using the <Story> doc block which I also haven't found.
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
Hi,
I want to have unattached doc pages in mdx with "overview tables" like this:
The problem is that some of these components have a
theme="light" | "dark"
arg and I'd like to be able to showcase that mode too in the same table. My first idea was to add the<Controls>
doc block, filter out everything except the theme arg and let users toggle it manually, but I have to assign it to a single story and only that one will change. Is there any way of making the arg table affect many stories at once? Or any other way of having an UI element that lets me toggle this propery live on mdx docs?Having an entire second table in the opposite mode would work for me too, but that would mean either writing another set of stories in dark mode, or finding a way of overriding this prop when using the
<Story>
doc block which I also haven't found.Thanks!
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions