diff --git a/lib/salad_ui.ex b/lib/salad_ui.ex index ae00544..fd09b1a 100644 --- a/lib/salad_ui.ex +++ b/lib/salad_ui.ex @@ -21,6 +21,7 @@ defmodule SaladUI do defmacro __using__(_) do quote do + import SaladUI.Helpers import SaladUI.Alert import SaladUI.Avatar import SaladUI.Badge diff --git a/lib/salad_ui/collapsible.ex b/lib/salad_ui/collapsible.ex index ec6380f..57a0933 100644 --- a/lib/salad_ui/collapsible.ex +++ b/lib/salad_ui/collapsible.ex @@ -22,24 +22,23 @@ defmodule SaladUI.Collapsible do required: true, doc: "Id to identify collapsible component, collapsible_trigger uses this id to toggle content visibility" - attr :open, :boolean, default: false, doc: "Initial state of collapsible content" + attr :open, :boolean, default: true, doc: "Initial state of collapsible content" attr :class, :string, default: nil slot(:inner_block, required: true) def collapsible(assigns) do assigns = assigns - |> assign(:builder, %{open: assigns[:open], id: assigns[:id]}) |> assign(:open, normalize_boolean(assigns[:open])) ~H"""