Storybook-readme: Allow option to disable rendering "<!-- STORY -->" for README-only purposes

Created on 1 Mar 2018  路  6Comments  路  Source: tuchk4/storybook-readme

First of all, thank you for the nice addon. It would be nice if there's an option to remove the story completely from the output. This is simply a feature request :)

Most helpful comment

new api released at [email protected]

All 6 comments

There is PR with feature implementation.
Current API to do this is:

```js
import { doc } from 'storybook-readme';
import CommonDocs from './CommonDocs.md';

storiesOf('Doc', module)
.add('Common',
doc(CommonDocs)
);
``

Yeah, very nice 馃憤

This works yet on the current release: () => doc(CommonDocs) instead of doc(CommonDocs).

maybe should left it like this () => doc(CommonDocs) so codebase will be lesser then now :)

BTW. How did you test it? Did you clone repo and link?

Sorry, I responded too fast. I played around myself in the sources of storybook-readme and I didn't discard my local changes. So the doc() method won't work with the current release. Sorry my fault :)

Here is how I've implemented it until the new API is released:

import styled from 'styled-components';
import { withDocs } from 'storybook-readme';
import CommonDocs from './CommonDocs.md';

const doc = withDocs({
  PreviewComponent: styled.div`
    display: none;
  `,
});

storiesOf('Doc', module)
  .add('Common', 
      doc(CommonDocs)
  );

new api released at [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chemoish picture chemoish  路  5Comments

callerc1 picture callerc1  路  4Comments

beyondghx picture beyondghx  路  6Comments

jayknott picture jayknott  路  6Comments

tuchk4 picture tuchk4  路  4Comments