Skip to content

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

Increase tab and details button hit area (#5992)

Sanne de Vries1260d1741472
diff --git a/assets/js/dashboard/components/tabs.tsx b/assets/js/dashboard/components/tabs.tsx
index 6cc9d75ef7..60a7babf08 100644
--- a/assets/js/dashboard/components/tabs.tsx
+++ b/assets/js/dashboard/components/tabs.tsx
@@ -59,7 +59,10 @@ export const TabButton = ({
})}
>
<button
- className={classNames('group/tab flex rounded-sm', className)}
+ className={classNames(
+ 'group/tab relative flex rounded-sm before:absolute before:inset-[-16px_-6px] before:content-[" "]',
+ className
+ )}
onClick={onClick}
>
<TabButtonText active={active}>{children}</TabButtonText>
@@ -92,7 +95,7 @@ export const DropdownTabButton = ({
})}
>
<Popover.Button
- className="group/tab inline-flex justify-between rounded-xs"
+ className="group/tab relative inline-flex justify-between rounded-xs before:absolute before:inset-[-16px_-6px] before:content-[' ']"
ref={dropdownButtonRef}
>
<TabButtonText active={active}>{children}</TabButtonText>
diff --git a/assets/js/dashboard/stats/more-link.js b/assets/js/dashboard/stats/more-link.js
index 99da748ef8..724a4445e6 100644
--- a/assets/js/dashboard/stats/more-link.js
+++ b/assets/js/dashboard/stats/more-link.js
@@ -30,7 +30,7 @@ export default function MoreLink({ linkProps, state }) {
}, [])
const baseClassName =
- 'flex mt-px text-gray-500 dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors duration-150'
+ 'relative flex mt-px text-gray-500 dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors duration-150 before:absolute before:inset-[-8px] before:content-[" "]'
const icon = detailsIcon()
if (state === MoreLinkState.HIDDEN) {