diff --git a/priv/storybook/components/icon.story.exs b/priv/storybook/components/icon.story.exs new file mode 100644 index 00000000..1ff60830 --- /dev/null +++ b/priv/storybook/components/icon.story.exs @@ -0,0 +1,82 @@ +defmodule Storybook.Components.Icon do + use PhoenixStorybook.Story, :component + + def function, do: &Doggo.icon/1 + + def svg do + """ + + """ + end + + def variations do + [ + %Variation{ + id: :default, + attributes: %{}, + slots: [svg()] + }, + %VariationGroup{ + id: :sizes, + variations: [ + %Variation{ + id: :small, + attributes: %{size: :small}, + slots: [svg()] + }, + %Variation{ + id: :normal, + attributes: %{size: :normal}, + slots: [svg()] + }, + %Variation{ + id: :medium, + attributes: %{size: :medium}, + slots: [svg()] + }, + %Variation{ + id: :large, + attributes: %{size: :large}, + slots: [svg()] + } + ] + }, + %VariationGroup{ + id: :label, + variations: [ + %Variation{ + id: :left, + attributes: %{label: "info", label_placement: :left}, + slots: [svg()] + }, + %Variation{ + id: :right, + attributes: %{label: "info", label_placement: :right}, + slots: [svg()] + }, + %Variation{ + id: :hidden, + attributes: %{label: "info", label_placement: :hidden}, + slots: [svg()] + } + ] + } + ] + end +end