ViewComponent / demo

Rails application with ViewComponent
MIT License
157 stars 15 forks source link

Styleguide #5

Closed xdmx closed 5 years ago

xdmx commented 5 years ago

What would be the best way to generate a live styleguide for the components?

Many projects use Storybook, which supports the ability to generate the styleguide from HTML.

Maybe a script (eg. rails styleguide) that loads all components, generate the html based on some kind of json configuration (like component.stories.json) to set the params/props, save that in a component.stories.js file and then have Storybook generate the final styleguide?

joelhawksley commented 5 years ago

@xdmx currently we've looked at doing something similar to Action Mailer previews, but this is super interesting. I'll likely mention the possibility of doing styleguides in the Rails PR, and will mention this issue there.

joelhawksley commented 5 years ago

@xdmx I'm closing this issue as we've moved development of the project to a gem: https://github.com/github/actionview-component.

Feel free to reopen there if you'd like to have a look into this ❤️