Doggo.Storybook (Doggo v0.18.4)

Copy Markdown View Source

Generates Phoenix Storybook stories for the Doggo components.

Phoenix Storybook is an optional dependency of Doggo. To use this module and mix dog.gen.stories, add it to the dependencies in your mix.exs.

Usage

In your story module, use Doggo.Storybook and pass the name of the module in which you call the Doggo.Components macros and the name of the component (not the macro name).

defmodule Storybook.Components.Accordion do
  use PhoenixStorybook.Story, :component
  use Doggo.Storybook, module: MyAppWeb.CoreComponents, name: :accordion
end

You can automatically generate story modules for all configured components with mix dog.gen.stories.