View Source PhxLiveStorybook.Story (phx_live_storybook v0.3.0)

A story captures the rendered state of a UI component. Developers write multiple stories per component that describe all the “interesting” states a component can support.

Each story will be displayed in the storybook as a code snippet alongside with the component preview.

usage

Usage

  def stories do
    [
      %Story{
        id: :default,
        description: "Default dropdown",
        attributes: %{
          label: "A dropdown",

        },
        slots: [
          ~s|<:entry path="#" label="Account settings"/>|,
          ~s|<:entry path="#" label="Support"/>|,
          ~s|<:entry path="#" label="License"/>|
        ]
      }
    ]
  end