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
The problem
It will be great if the initialOpen option on this line is allowed to be passed from the styleguide.config with each section similar to sectionDepth.
As I was going to make a PR, I had thought simply removing it from that line will make the one I set in config available to use in the ComponentListRenderer but then I realized every custom options passed to our sections in the config aren't being sent all the way to ComponentsListhere.
I understand if we don't want to make initialOpen available at the config level for some reasons but I would like to implement this effect myself of having specific sections in toc expanded and I can't do that if I don't get my custom parameters. Here's me trying to use expand:
module.exports={sections: [{name: 'Components',content: 'docs/ui.md',components: 'components/**/index.js',exampleMode: 'collapse',usageMode: 'expand',expanded: true,// need access to thissectionDepth: 1,}]}
Proposed solution
Make initialOpen set per section from the config and do not override but instead provide defaults for when user didn't set
Alternative solutions
Passing all user options at config and always making them available for developers writing custom styleguide render files
The text was updated successfully, but these errors were encountered:
The problem
It will be great if the
initialOpen
option on this line is allowed to be passed from the styleguide.config with each section similar tosectionDepth
.As I was going to make a PR, I had thought simply removing it from that line will make the one I set in config available to use in the
ComponentListRenderer
but then I realized every custom options passed to our sections in the config aren't being sent all the way toComponentsList
here.I understand if we don't want to make
initialOpen
available at the config level for some reasons but I would like to implement this effect myself of having specific sections in toc expanded and I can't do that if I don't get my custom parameters. Here's me trying to useexpand
:Proposed solution
Make
initialOpen
set per section from the config and do not override but instead provide defaults for when user didn't setAlternative solutions
Passing all user options at config and always making them available for developers writing custom styleguide render files
The text was updated successfully, but these errors were encountered: