Repository navigation
Does excludeDecorators work in Source doc blocks? #36515
Replies: 1 comment 1 reply
|
context.parameters.docs.source.excludeDecoratorsThe working configuration is therefore a story parameter: export const PrimaryWithoutDecorators = {
...Primary,
parameters: {
docs: {
source: {
excludeDecorators: true,
},
},
},
};Then reference both variants: <Source of={ButtonStories.Primary} />
<Source of={ButtonStories.PrimaryWithoutDecorators} />Because the value comes from the story context, it cannot currently vary between two The HTML renderer reads the parameter here. The documentation describing |

excludeDecoratorscurrently does not work as a per-<Source>prop, so your reproduction matches the implementation rather than an MDX mistake.SourcePropsdoes not declare, consume, or forwardexcludeDecorators. For the HTML renderer, source generation only checks:The working configuration is therefore a story parameter:
Then reference both variants:
Because the value comes from the story contex…