Current section
41 Versions
Jump to
Current section
41 Versions
Compare versions
3
files changed
+8
additions
-4
deletions
| @@ -1,7 +1,7 @@ | |
| 1 1 | {<<"links">>, |
| 2 2 | [{<<"GitHub">>,<<"https://github.com/phcurado/daisy_ui_components">>}]}. |
| 3 3 | {<<"name">>,<<"daisy_ui_components">>}. |
| 4 | - {<<"version">>,<<"0.7.0">>}. |
| 4 | + {<<"version">>,<<"0.7.1">>}. |
| 5 5 | {<<"description">>,<<"DaisyUI component library for LiveView">>}. |
| 6 6 | {<<"elixir">>,<<"~> 1.14">>}. |
| 7 7 | {<<"app">>,<<"daisy_ui_components">>}. |
| @@ -22,7 +22,7 @@ defmodule DaisyUIComponents.Dropdown do | |
| 22 22 | """ |
| 23 23 | attr :class, :string, default: nil |
| 24 24 | attr :direction, :string, values: directions() |
| 25 | - attr :align_end, :boolean, default: nil |
| 25 | + attr :align, :string, values: ["end"] |
| 26 26 | attr :hover, :boolean, default: nil |
| 27 27 | attr :open, :boolean, default: nil |
| 28 28 | attr :rest, :global |
| @@ -33,7 +33,7 @@ defmodule DaisyUIComponents.Dropdown do | |
| 33 33 | assign(assigns, :class, [ |
| 34 34 | "dropdown", |
| 35 35 | dropdown_direction(assigns[:direction]), |
| 36 | - maybe_add_class(assigns[:align_end], "dropdown-end"), |
| 36 | + dropdown_align(assigns[:align]), |
| 37 37 | maybe_add_class(assigns.hover, "dropdown-hover"), |
| 38 38 | maybe_add_class(assigns.open, "dropdown-open"), |
| 39 39 | assigns.class |
| @@ -52,4 +52,8 @@ defmodule DaisyUIComponents.Dropdown do | |
| 52 52 | defp dropdown_direction("left"), do: "dropdown-left" |
| 53 53 | defp dropdown_direction("right"), do: "dropdown-right" |
| 54 54 | defp dropdown_direction(nil), do: nil |
| 55 | + |
| 56 | + # Align |
| 57 | + defp dropdown_align("end"), do: "dropdown-end" |
| 58 | + defp dropdown_align(nil), do: nil |
| 55 59 | end |
| @@ -2,7 +2,7 @@ defmodule DaisyUIComponents.MixProject do | |
| 2 2 | use Mix.Project |
| 3 3 | |
| 4 4 | @source_url "https://github.com/phcurado/daisy_ui_components" |
| 5 | - @version "0.7.0" |
| 5 | + @version "0.7.1" |
| 6 6 | |
| 7 7 | def project do |
| 8 8 | [ |