View Source PhoenixStorybook.Stories.VariationGroup (phoenix_storybook v0.7.2)
A variation group is a set of similar variations that will be rendered together in a single preview <pre> block.
Usage
def variations do
[
%VariationGroup{
id: :colors,
description: "Different color buttons",
variations: [
%Variation{
id: :blue_button,
attributes: %{label: "A button", color: :blue }
},
%Variation{
id: :red_button,
attributes: %{label: "A button", color: :red }
},
%Variation{
id: :green_button,
attributes: %{label: "A button", color: :green }
}
]
}
]
end
Summary
Types
@type t() :: %PhoenixStorybook.Stories.VariationGroup{ description: String.t() | nil, id: atom(), template: :unset | String.t() | nil | false, variations: [PhoenixStorybook.Stories.Variation.t()] }