szTheory / view_component_storybook_example

[mirror] Example app demonstrating ViewComponent::Storybook to preview ViewComponents in Storybook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ViewComponent::Storybook Example

This project demonstrates Storybook Server running using Stories and ViewComponents generated by ViewComponent::Storybook.

Ruby Version

Use your favorite Ruby version manager to install 2.7.2

Install Gems and Node modules

bundle install
yarn

Genrate the Strobook stories JSON

rake view_component_storybook:write_stories_json

Run the Rails backend:

rails s

This starts a Rails dev server on port 3000.

Run Storybook

To view the stories in the storybook UI:

yarn storybook

This runs the Storybook dev server loading stories from the Rails endpoint

About

[mirror] Example app demonstrating ViewComponent::Storybook to preview ViewComponents in Storybook


Languages

Language:Ruby 74.3%Language:HTML 15.3%Language:JavaScript 8.8%Language:CSS 1.7%