Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix spacing between two notices in funnel settings (#3092)

hq134c053ed1260
diff --git a/lib/plausible_web/components/generic.ex b/lib/plausible_web/components/generic.ex
index 2ab6080092..069027fecf 100644
--- a/lib/plausible_web/components/generic.ex
+++ b/lib/plausible_web/components/generic.ex
@@ -5,11 +5,15 @@ defmodule PlausibleWeb.Components.Generic do
use Phoenix.Component
attr :title, :string, default: "Notice"
+ attr :class, :string, default: ""
slot :inner_block
def notice(assigns) do
~H"""
- <div class="rounded-md bg-yellow-50 p-4 dark:bg-transparent dark:border border-yellow-200">
+ <div class={[
+ "rounded-md bg-yellow-50 p-4 dark:bg-transparent dark:border border-yellow-200",
+ @class
+ ]}>
<div class="flex">
<div class="flex-shrink-0">
<svg
diff --git a/lib/plausible_web/live/funnel_settings.ex b/lib/plausible_web/live/funnel_settings.ex
index 4e7ae62800..695e34e09f 100644
--- a/lib/plausible_web/live/funnel_settings.ex
+++ b/lib/plausible_web/live/funnel_settings.ex
@@ -58,7 +58,7 @@ defmodule PlausibleWeb.Live.FunnelSettings do
</div>
<div :if={@goal_count < Funnel.min_steps()}>
- <PlausibleWeb.Components.Generic.notice>
+ <PlausibleWeb.Components.Generic.notice class="mt-4" title="Not enough goals">
You need to define at least two goals to create a funnel. Go ahead and <%= link(
"add goals",
to: PlausibleWeb.Router.Helpers.site_path(@socket, :new_goal, @domain),