Skip to content

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

Add border to tab component (#5848)

Sanne de Vries638a59b8f5bf
diff --git a/lib/plausible_web/live/goal_settings/form.ex b/lib/plausible_web/live/goal_settings/form.ex
index 148afb2ded..b2ff5cc02d 100644
--- a/lib/plausible_web/live/goal_settings/form.ex
+++ b/lib/plausible_web/live/goal_settings/form.ex
@@ -446,7 +446,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do
def tabs(assigns) do
~H"""
<div class="text-sm mt-6 font-medium dark:text-gray-100">Goal trigger</div>
- <div class="my-2 text-sm w-full flex gap-1 overflow-hidden">
+ <div class="my-2 p-1 text-sm w-full flex gap-1 overflow-hidden rounded-lg border border-gray-300 dark:border-gray-700">
<.tab
id="event-tab"
tab_value="custom_events"
@@ -485,7 +485,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do
~H"""
<a
class={[
- "flex-1 text-center py-2.5 rounded-md font-medium hover:bg-gray-100 dark:hover:bg-gray-750 transition-colors duration-150",
+ "flex-1 text-center py-2 px-3 rounded-md font-medium hover:bg-gray-100 dark:hover:bg-gray-750 transition-colors duration-150",
"cursor-pointer",
@selected? && "bg-gray-150 dark:bg-gray-700 text-gray-800 dark:text-white",
!@selected? && "dark:text-gray-200 text-gray-600 hover:text-gray-800 dark:hover:text-white"
diff --git a/lib/plausible_web/live/installation.ex b/lib/plausible_web/live/installation.ex
index 9e399799e8..3a45d165ef 100644
--- a/lib/plausible_web/live/installation.ex
+++ b/lib/plausible_web/live/installation.ex
@@ -121,7 +121,7 @@ defmodule PlausibleWeb.Live.Installation do
</div>
</:loading>
- <div class="grid grid-cols-2 sm:flex sm:flex-row gap-1 rounded-md">
+ <div class="grid grid-cols-2 sm:flex sm:flex-row gap-1 rounded-lg p-1 border border-gray-300 dark:border-gray-700">
<.tab
patch={"?type=manual&flow=#{@flow}"}
selected={@installation_type.result == "manual"}
@@ -272,7 +272,7 @@ defmodule PlausibleWeb.Live.Installation do
defp tab(assigns) do
base_classes =
- "rounded-md px-3.5 py-2.5 text-sm font-medium flex items-center flex-1 justify-center whitespace-nowrap hover:bg-gray-100 dark:hover:bg-gray-750 transition-colors duration-150"
+ "rounded-md px-3 py-2 text-sm font-medium flex items-center flex-1 justify-center whitespace-nowrap hover:bg-gray-100 dark:hover:bg-gray-750 transition-colors duration-150"
selected_class =
if assigns[:selected] do