Storybook-readme: Allow <!-- CODE --> and <!-- PROP_STABLE --> snippets (React)

Created on 14 Feb 2019  路  5Comments  路  Source: tuchk4/storybook-readme

First of all, thank you for this addon!

Before I'd installed this addon, I was playing with @storybook/addon-info. I really liked the autogenerated code and props table snippet from this addon.

So I was thinking, it would be really cool if we could do something like this in the README.md:

# Avatar

### Usage

This code is autogenerated based on the code in the `storiesOff#add` function:

<!-- CODE -->

### Preview

<!-- STORY -->

### Properties

A Markdown table with all props generated from the defaultProps and propTypes:

<!-- PROPS_TABLE -->

Most helpful comment

@ChristiaanScheermeijer Nice idea!
I will definitely do it in next release. Planning to do it at the start of next week

All 5 comments

@ChristiaanScheermeijer Nice idea!
I will definitely do it in next release. Planning to do it at the start of next week

@ChristiaanScheermeijer released at [email protected]

Here is docs

Here is Story
<!-- STORY -->

Here is Props table
<!-- PROPS -->

Here is docs after props table

Note that right now there are __breaking changes at alpha version__. I wrote about here https://github.com/tuchk4/storybook-readme/issues/118#issuecomment-472684902

feature added at 5.0.0

@tuchk4 Are there any plans to support <!-- CODE --> so that we can handle the use case the description of this issue mentions?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jayknott picture jayknott  路  6Comments

PaulieScanlon picture PaulieScanlon  路  5Comments

mktrue picture mktrue  路  3Comments

janusch picture janusch  路  4Comments

lcaroselli picture lcaroselli  路  5Comments