phoenix_storybook icon indicating copy to clipboard operation
phoenix_storybook copied to clipboard

Open a story group in the component Playground

Open cblavier opened this issue 3 years ago • 0 comments

This ticket must be done after #35

The component playground should now be able to render all stories of a single StoryGroup at once. As in #35 one should be able:

  • to open a story group in the playground from the Stories
  • to pick a story group from the story select input from the Playground

When the playground is initialized from the StoryGroup all attributes that have different values across stories are locked and cannot be edited in the attributes tab.

For instance, with the following StoryGroup the color attribute will be locked whereas text and icon will still be editable. When updating an editable field, all stories are updated at once.

%StoryGroup{
  id: :colors,
  stories:
    for color <- ~w(info primary success warning danger)a do
      %Story{
        id: color,
        attributes: %{
          text: "My badge",
          icon: "fa fa-icon",
          color: color
        }
      }
    end
}

cblavier avatar Aug 19 '22 12:08 cblavier