This may be a dumb question, but would there be any consideration to provide a HOC that would be more general and just transform the markdown itself?
These are already great:
withReadme)doc)withDocs with preview component)withDocs with comment)I was thinking something like this?
import { withInfo } from '@storybook/addon-info';
import { withMarkdown } from 'storybook-readme';
import INTRO from './INTRO.md';
import OUTRO from './OUTRO.md';
storiesOf('Introduction', module)
.add('Test', withInfo()(
<div>
{withMarkdown(INTRO)}
<div>Hi</div>
{withMarkdown(OUTRO)}
</div>
)
;
It _might_ be able to replace the wrapper cases, assuming people want to split up their markdown files.
Thoughts?
__Context__
It looks like adding withInfo is placed within the PreviewComponent, defaulted to https://github.com/tuchk4/storybook-readme/blob/master/packages/storybook-readme/src/env/react/components/StoryPreview.js.

I am going to export Markdown component at next release
@chemoish take a look at this example https://tuchk4.github.io/storybook-readme/?selectedKind=Marked&selectedStory=Marked1&full=0&addons=1&stories=1&panelRight=1&addonPanel=storybooks%2Fstorybook-addon-knobs
Here is docs https://github.com/tuchk4/storybook-readme#custom-layout
Now feature available in 4.0.0-beta1
@tuchk4 Looks great!
Minor overall feedback:
README).README, _slight_ challenge to map storybook to README.README, or story, to match (e.g. Custom Layout > Marked)鈥擟urrently its "Custom layout" in the README and Marked > Marked1 in the story.I understand README is a different than the story, but there could be a minor correction in the README.
-<Button label="Button before docs" />
+<Button label="Button before intro" />
Many of these things are very nit, but thanks again for all your hard work!
[x] Would be great to link your storybook in the repository's description (little bit hard to find in the middle of the README).
[ ] Would be nice if storybook followed the same hierarchy as the README, slight challenge to map storybook to README.
[x] Possibly update README, or story, to match (e.g. Custom Layout > Marked)鈥擟urrently its "Custom layout" in the README and Marked > Marked1 in the story.
[x] I understand README is a different than the story, but there could be a minor correction in the README.
released in 4.0.0
Most helpful comment
I am going to export Markdown component at next release