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

* Fix spacing between two notices in funnel settings

* Fixup
This commit is contained in:
hq1 2023-06-28 14:11:48 +02:00 committed by GitHub
parent 21a968ef2c
commit 34c053ed12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -5,11 +5,15 @@ defmodule PlausibleWeb.Components.Generic do
use Phoenix.Component use Phoenix.Component
attr :title, :string, default: "Notice" attr :title, :string, default: "Notice"
attr :class, :string, default: ""
slot :inner_block slot :inner_block
def notice(assigns) do def notice(assigns) do
~H""" ~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">
<div class="flex-shrink-0"> <div class="flex-shrink-0">
<svg <svg

View File

@ -58,7 +58,7 @@ defmodule PlausibleWeb.Live.FunnelSettings do
</div> </div>
<div :if={@goal_count < Funnel.min_steps()}> <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( You need to define at least two goals to create a funnel. Go ahead and <%= link(
"add goals", "add goals",
to: PlausibleWeb.Router.Helpers.site_path(@socket, :new_goal, @domain), to: PlausibleWeb.Router.Helpers.site_path(@socket, :new_goal, @domain),