View Source PhxLiveStorybook.VariationGroup (phx_live_storybook v0.2.0)
A variation group is a set of similar variations that will be rendered together in a single preview <pre> block.
usage
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