For some stories, it’s not sufficient to show source code from the story function. Instead, source code from the whole file needs to be shown. This can be done by setting parameter docs.source.code to __STORY__.
For example:
StoryName.parameters = {
docs: {
description: {
story: 'A button supports `small`, `medium` and `large` size. Default size is `medium`.',
},
source: {
// @ts-ignore
code: __STORY__,
},
},
};
We need to go through all stories in documentation and set this parameter where necessary. It is necessary, for example, for Nested Submenu story on Menu docs page.
For some stories, it’s not sufficient to show source code from the story function. Instead, source code from the whole file needs to be shown. This can be done by setting parameter
docs.source.codeto__STORY__.For example:
We need to go through all stories in documentation and set this parameter where necessary. It is necessary, for example, for Nested Submenu story on Menu docs page.