From 0f97c8061f69ac67088ab86116aebff4f7592ec1 Mon Sep 17 00:00:00 2001 From: leandrocp Date: Thu, 5 Dec 2024 15:50:19 +0000 Subject: [PATCH] auto format code --- lib/beacon/web/components/core_components.ex | 60 +++++++++---------- .../web/components/layouts/app.html.heex | 2 +- .../web/components/layouts/dynamic.html.heex | 2 +- .../web/components/layouts/runtime.html.heex | 10 ++-- lib/heroicons.ex | 16 ++--- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/lib/beacon/web/components/core_components.ex b/lib/beacon/web/components/core_components.ex index ca1be3bd6..d2b669fe5 100644 --- a/lib/beacon/web/components/core_components.ex +++ b/lib/beacon/web/components/core_components.ex @@ -68,7 +68,7 @@ defmodule Beacon.Web.CoreComponents do
- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
@@ -113,9 +113,9 @@ defmodule Beacon.Web.CoreComponents do

<.icon :if={@kind == :info} name="hero-information-circle-mini" class="h-4 w-4" /> <.icon :if={@kind == :error} name="hero-exclamation-circle-mini" class="h-4 w-4" /> - <%= @title %> + {@title}

-

<%= msg %>

+

{msg}

@@ -146,7 +146,7 @@ defmodule Beacon.Web.CoreComponents do phx-connected={hide("#client-error")} hidden > - <%= gettext("Attempting to reconnect") %> + {gettext("Attempting to reconnect")} <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" /> @@ -158,7 +158,7 @@ defmodule Beacon.Web.CoreComponents do phx-connected={hide("#server-error")} hidden > - <%= gettext("Hang in there while we get back on track") %> + {gettext("Hang in there while we get back on track")} <.icon name="hero-arrow-path" class="ml-1 h-3 w-3 animate-spin" /> @@ -192,9 +192,9 @@ defmodule Beacon.Web.CoreComponents do ~H""" <.form :let={f} for={@for} as={@as} {@rest}>
- <%= render_slot(@inner_block, f) %> + {render_slot(@inner_block, f)}
- <%= render_slot(action, f) %> + {render_slot(action, f)}
@@ -226,7 +226,7 @@ defmodule Beacon.Web.CoreComponents do ]} {@rest} > - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -297,9 +297,9 @@ defmodule Beacon.Web.CoreComponents do - <.error :for={msg <- @errors}><%= msg %> + <.error :for={msg <- @errors}>{msg} """ end @@ -307,7 +307,7 @@ defmodule Beacon.Web.CoreComponents do def input(%{type: "select"} = assigns) do ~H"""
- <.label for={@id}><%= @label %> + <.label for={@id}>{@label} - <.error :for={msg <- @errors}><%= msg %> + <.error :for={msg <- @errors}>{msg}
""" end @@ -326,7 +326,7 @@ defmodule Beacon.Web.CoreComponents do def input(%{type: "textarea"} = assigns) do ~H"""
- <.label for={@id}><%= @label %> + <.label for={@id}>{@label} - <.error :for={msg <- @errors}><%= msg %> + <.error :for={msg <- @errors}>{msg}
""" end @@ -347,7 +347,7 @@ defmodule Beacon.Web.CoreComponents do def input(assigns) do ~H"""
- <.label for={@id}><%= @label %> + <.label for={@id}>{@label} - <.error :for={msg <- @errors}><%= msg %> + <.error :for={msg <- @errors}>{msg}
""" end @@ -375,7 +375,7 @@ defmodule Beacon.Web.CoreComponents do def label(assigns) do ~H""" """ end @@ -389,7 +389,7 @@ defmodule Beacon.Web.CoreComponents do ~H"""

<.icon name="hero-exclamation-circle-mini" class="mt-0.5 h-5 w-5 flex-none" /> - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}

""" end @@ -408,13 +408,13 @@ defmodule Beacon.Web.CoreComponents do

- <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}

- <%= render_slot(@subtitle) %> + {render_slot(@subtitle)}

-
<%= render_slot(@actions) %>
+
{render_slot(@actions)}
""" end @@ -455,9 +455,9 @@ defmodule Beacon.Web.CoreComponents do - + @@ -475,7 +475,7 @@ defmodule Beacon.Web.CoreComponents do
- <%= render_slot(col, @row_item.(row)) %> + {render_slot(col, @row_item.(row))}
@@ -483,7 +483,7 @@ defmodule Beacon.Web.CoreComponents do
- <%= render_slot(action, @row_item.(row)) %> + {render_slot(action, @row_item.(row))}
@@ -513,8 +513,8 @@ defmodule Beacon.Web.CoreComponents do
-
<%= item.title %>
-
<%= render_slot(item) %>
+
{item.title}
+
{render_slot(item)}
@@ -536,7 +536,7 @@ defmodule Beacon.Web.CoreComponents do
<.link navigate={@navigate} class="text-sm font-semibold leading-6 text-zinc-900 hover:text-zinc-700"> <.icon name="hero-arrow-left-solid" class="h-3 w-3" /> - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)}
""" diff --git a/lib/beacon/web/components/layouts/app.html.heex b/lib/beacon/web/components/layouts/app.html.heex index 81ac27d9e..0230d1eae 100644 --- a/lib/beacon/web/components/layouts/app.html.heex +++ b/lib/beacon/web/components/layouts/app.html.heex @@ -1,5 +1,5 @@
- <%= @inner_content %> + {@inner_content}
diff --git a/lib/beacon/web/components/layouts/dynamic.html.heex b/lib/beacon/web/components/layouts/dynamic.html.heex index e486bf020..e44efc65e 100644 --- a/lib/beacon/web/components/layouts/dynamic.html.heex +++ b/lib/beacon/web/components/layouts/dynamic.html.heex @@ -1,2 +1,2 @@ -<%= render_dynamic_layout(assigns) %> +{render_dynamic_layout(assigns)} diff --git a/lib/beacon/web/components/layouts/runtime.html.heex b/lib/beacon/web/components/layouts/runtime.html.heex index b79ace463..1b7bb0d8e 100644 --- a/lib/beacon/web/components/layouts/runtime.html.heex +++ b/lib/beacon/web/components/layouts/runtime.html.heex @@ -2,17 +2,17 @@ - <%= render_meta_tags(assigns) %> - <%= render_schema(assigns) %> + {render_meta_tags(assigns)} + {render_schema(assigns)} <.live_title> - <%= render_page_title(assigns) %> + {render_page_title(assigns)} - <%= render_resource_links(assigns) %> + {render_resource_links(assigns)} - <%= @inner_content %> + {@inner_content} diff --git a/lib/heroicons.ex b/lib/heroicons.ex index 8c04f1c59..6e6ea2011 100644 --- a/lib/heroicons.ex +++ b/lib/heroicons.ex @@ -11,16 +11,16 @@ defmodule Beacon.Heroicons do Map.merge(%{micro: false}, assigns) |> case do %{mini: false, solid: false, micro: false} -> - ~H"<.svg_outline {@rest}><%= {:safe, @paths[:outline]} %>" + ~H"<.svg_outline {@rest}>{{:safe, @paths[:outline]}}" %{solid: true, mini: false, micro: false} -> - ~H"<.svg_solid {@rest}><%= {:safe, @paths[:solid]} %>" + ~H"<.svg_solid {@rest}>{{:safe, @paths[:solid]}}" %{mini: true, solid: false, micro: false} -> - ~H"<.svg_mini {@rest}><%= {:safe, @paths[:mini]} %>" + ~H"<.svg_mini {@rest}>{{:safe, @paths[:mini]}}" %{micro: true, solid: false, mini: false} -> - ~H"<.svg_micro {@rest}><%= {:safe, @paths[:micro]} %>" + ~H"<.svg_micro {@rest}>{{:safe, @paths[:micro]}}" %{} -> raise ArgumentError, "expected either mini or solid, but got both." @@ -41,7 +41,7 @@ defmodule Beacon.Heroicons do defp svg_outline(assigns) do ~H""" - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -53,7 +53,7 @@ defmodule Beacon.Heroicons do defp svg_solid(assigns) do ~H""" - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -65,7 +65,7 @@ defmodule Beacon.Heroicons do defp svg_mini(assigns) do ~H""" - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end @@ -77,7 +77,7 @@ defmodule Beacon.Heroicons do defp svg_micro(assigns) do ~H""" - <%= render_slot(@inner_block) %> + {render_slot(@inner_block)} """ end
<%= col[:label] %>{col[:label]} - <%= gettext("Actions") %> + {gettext("Actions")}