Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow <!-- CODE --> and <!-- PROP_STABLE --> snippets (React) #113

Closed
ChristiaanScheermeijer opened this issue Feb 14, 2019 · 5 comments
Closed

Comments

@ChristiaanScheermeijer
Copy link

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 -->
@tuchk4
Copy link
Owner

tuchk4 commented Feb 14, 2019

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

@tuchk4
Copy link
Owner

tuchk4 commented Mar 6, 2019

Will be released with #118

@tuchk4
Copy link
Owner

tuchk4 commented Mar 14, 2019

@ChristiaanScheermeijer released at storybook-readme@5.0.0-alpha.150

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 #118 (comment)

@tuchk4
Copy link
Owner

tuchk4 commented Mar 16, 2019

feature added at 5.0.0

@deini
Copy link
Contributor

deini commented Jul 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants