From c62b1826c76bd0be245481f82f42fb7e90c39f8a Mon Sep 17 00:00:00 2001 From: Adam Wiggall Date: Thu, 3 Feb 2022 08:31:58 -0500 Subject: [PATCH] Update flash, reduce markup and alignment improved Flash message content are misaligned, and there is exteraneous markup. Replace check icon with exclamation icon for :error flash. This commit improves alignment, slightly tweeks the icon sizes (subjective), matches colors, and uses what I believe to be more idiomatic Tailwind. --- lib/live_beats_web/live/live_helpers.ex | 48 +++++++++---------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/lib/live_beats_web/live/live_helpers.ex b/lib/live_beats_web/live/live_helpers.ex index 9a5359c..f94d662 100644 --- a/lib/live_beats_web/live/live_helpers.ex +++ b/lib/live_beats_web/live/live_helpers.ex @@ -59,22 +59,14 @@ defmodule LiveBeatsWeb.LiveHelpers do phx-click={JS.push("lv:clear-flash") |> JS.remove_class("fade-in-scale", to: "#flash") |> hide("#flash")} phx-hook="Flash" > -
-
- <.icon name={:check_circle} solid /> -
-
-

- <%= live_flash(@flash, @kind) %> -

-
-
-
- -
-
+
+ <.icon name={:exclamation_circle} class="w-5 w-5"/> +

+ <%= live_flash(@flash, @kind) %> +

+
<% end %> @@ -91,22 +83,14 @@ defmodule LiveBeatsWeb.LiveHelpers do phx-value-key="info" phx-hook="Flash" > -
-
- <.icon name={:check_circle} solid /> -
-
-

- <%= live_flash(@flash, @kind) %> -

-
-
-
- -
-
+
+ <.icon name={:check_circle} class="w-5 h-5"/> +

+ <%= live_flash(@flash, @kind) %> +

+
<% end %>