Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Consolidate tooltip styles and add light mode support (#6760)
Sanne de Vriesfc5a4d8f65d0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d3eeb220e2..152e219cac 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.- Add "Last 24 Hours" to dashboard time range picker and Stats API v2- Always compare against the same time range in comparisons with "Today"- Added vertical indicator line to graph to make it easier to see what's hovered / selected+- Added light-mode support to tooltips### Removeddiff --git a/assets/css/app.css b/assets/css/app.cssindex 5d0c59786b..37d302d9b8 100644--- a/assets/css/app.css+++ b/assets/css/app.css@@ -168,6 +168,28 @@.input-multiline {@apply h-auto py-2.5;}++ /*+ * Tooltip classes shared between the React `Tooltip`, the main graph and map+ * tooltips and the Phoenix `tooltip` component.+ */+ .tooltip {+ @apply rounded-md font-medium bg-white text-gray-800 ring-1+ ring-black/5 dark:ring-gray-700 dark:bg-gray-750 dark:text-gray-100;+ }++ .tooltip-xs {+ @apply px-2.5 py-1.5 shadow-md text-[0.8125rem]/5;+ }++ .tooltip-sm {+ @apply px-3 py-2 shadow-lg text-sm;+ }++ /* Keep after the size classes so the dark shadow override wins. */+ .tooltip-theme-darker {+ @apply dark:bg-gray-950 dark:ring-gray-900 dark:shadow-none;+ }}@utility btn-text-primary {diff --git a/assets/js/dashboard/annotations/annotation-list-items.tsx b/assets/js/dashboard/annotations/annotation-list-items.tsxindex dc5a3c0443..d860e0cac4 100644--- a/assets/js/dashboard/annotations/annotation-list-items.tsx+++ b/assets/js/dashboard/annotations/annotation-list-items.tsx@@ -10,11 +10,7 @@ export const AnnotationsListContainer = ({children}: {children: ReactNode-}) => (- <div className="text-sm font-normal text-gray-100 flex flex-col gap-2">- {children}- </div>-)+}) => <div className="flex flex-col gap-2">{children}</div>const VerticalBar = () => (<div className="rounded-xs w-[3px] bg-green-500 shrink-0" />@@ -36,7 +32,7 @@ export const AnnotationAuthorshipLine = ({}) => (<divdata-testid="annotation-attribution"- className="flex items-baseline text-xs text-gray-300 pr-8"+ className="flex items-baseline text-xs text-gray-500 dark:text-gray-400 pr-8"><span className="truncate min-w-0">{getAnnotationAuthorship(annotation)}diff --git a/assets/js/dashboard/annotations/interactive-annotations-list.tsx b/assets/js/dashboard/annotations/interactive-annotations-list.tsxindex fd01220e74..fc0f7a29f6 100644--- a/assets/js/dashboard/annotations/interactive-annotations-list.tsx+++ b/assets/js/dashboard/annotations/interactive-annotations-list.tsx@@ -15,7 +15,7 @@ import { useUserContext } from '../user-context'import { PencilIcon } from '../components/icons'const ScrollableArea = (props: { children: ReactNode }) => (- <div className="max-h-25 sm:max-h-40 overflow-y-auto overflow-x-hidden -mr-2.5 pr-2.5 [scrollbar-width:thin] [scrollbar-color:theme(colors.gray.600)_transparent]">+ <div className="max-h-25 sm:max-h-40 overflow-y-auto overflow-x-hidden -mr-2.5 pr-2.5 [scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent]">{props.children}</div>)@@ -57,7 +57,7 @@ export const InteractiveAnnotationsList = ({{editable && !isTouchDevice && (<buttonaria-label="Edit note"- className="absolute top-px right-0 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-gray-300 hover:text-gray-100 focus:outline-none"+ className="absolute top-px right-0 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-gray-500 hover:text-gray-600 dark:text-gray-300 dark:hover:text-gray-100 focus:outline-none"onClick={() => openEdit(annotation)}><PencilIcon className="size-4" />diff --git a/assets/js/dashboard/keybinding.tsx b/assets/js/dashboard/keybinding.tsxindex 7fa707d884..da5715ef0e 100644--- a/assets/js/dashboard/keybinding.tsx+++ b/assets/js/dashboard/keybinding.tsx@@ -147,7 +147,7 @@ export function KeybindHint({return (<kbdclassName={classNames(- 'hidden md:block rounded bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 px-1.5 font-medium text-xs text-gray-400',+ 'hidden md:block rounded border border-gray-200 dark:border-gray-600 px-1.5 font-medium text-xs text-gray-500 dark:text-gray-300',className)}>diff --git a/assets/js/dashboard/nav-menu/filters-bar.tsx b/assets/js/dashboard/nav-menu/filters-bar.tsxindex cdab6ef9ef..f18da826b1 100644--- a/assets/js/dashboard/nav-menu/filters-bar.tsx+++ b/assets/js/dashboard/nav-menu/filters-bar.tsx@@ -15,6 +15,7 @@ import { AppNavigationLink } from '../navigation/use-app-navigate'import { popover } from '../components/popover'import { QuestionMarkCircleIcon, TrashIcon } from '../components/icons'import { Tooltip } from '../util/tooltip'+import { KeybindHint } from '../keybinding'import {canSeeSaveAsSegmentAction,isSegmentFilter@@ -175,11 +176,7 @@ const ActionTooltip = ({info={<span className="flex items-center gap-x-2 whitespace-nowrap">{label}- {keybind && (- <kbd className="rounded-sm border border-gray-600 dark:border-gray-500 px-1 font-sans text-xs text-gray-300">- {keybind}- </kbd>- )}+ {keybind && <KeybindHint>{keybind}</KeybindHint>}{docsLink && (<ahref={docsLink.href}diff --git a/assets/js/dashboard/stats/breakdowns.tsx b/assets/js/dashboard/stats/breakdowns.tsxindex 60a1e8c6e7..c79e2eedc5 100644--- a/assets/js/dashboard/stats/breakdowns.tsx+++ b/assets/js/dashboard/stats/breakdowns.tsx@@ -138,30 +138,28 @@ export function MetricValueTooltipContent({<div><div className="flex gap-x-4"><div className="flex flex-col">- <span className="font-medium text-sm/6 text-white">+ <span className="font-semibold">{longFormatter(value)}{label}</span>- <div className="font-normal text-xs text-white">- {dateRangeLabel}- </div>+ <div className="font-normal">{dateRangeLabel}</div></div>{comparison.change != null && (<ChangeArrowmetric={metric}change={comparison.change}- className="text-xs/6 font-medium text-white"+ className="text-xs/5"/>)}</div></div>- <div className="w-full border-t border-gray-600" />+ <div className="w-full border-t border-gray-200 dark:border-gray-600" /><div>- <div className="font-medium text-sm/6 text-gray-300/80">+ <div className="font-semibold text-gray-500 dark:text-gray-400">{longFormatter(comparison.value)}{label}</div>- <div className="font-normal text-xs text-gray-300/80">+ <div className="font-normal text-gray-500 dark:text-gray-400">{comparisonDateRangeLabel}</div></div>diff --git a/assets/js/dashboard/stats/current-visitors.js b/assets/js/dashboard/stats/current-visitors.jsindex 007726e554..66b1559e37 100644--- a/assets/js/dashboard/stats/current-visitors.js+++ b/assets/js/dashboard/stats/current-visitors.js@@ -16,12 +16,12 @@ export default function CurrentVisitors({ className = '' }) {<Tooltipinfo={<div>- <p className="whitespace-nowrap text-small">+ <p className="whitespace-nowrap">Last updated{' '}<SecondsSinceLastLoad lastLoadTimestamp={lastLoadTimestamp} />sago</p>- <p className="whitespace-nowrap font-normal text-xs">+ <p className="whitespace-nowrap font-normal text-gray-500 dark:text-gray-400">Click to view realtime dashboard</p></div>diff --git a/assets/js/dashboard/stats/graph/main-graph.tsx b/assets/js/dashboard/stats/graph/main-graph.tsxindex b41de29162..e246c52fcc 100644--- a/assets/js/dashboard/stats/graph/main-graph.tsx+++ b/assets/js/dashboard/stats/graph/main-graph.tsx@@ -53,6 +53,7 @@ import { useUserContext } from '../../user-context'import { Button } from '../../components/button'import { HoverAnnotationsList } from '../../annotations/hover-annotations-list'import { InteractiveAnnotationsList } from '../../annotations/interactive-annotations-list'+import { tooltipClassName } from '../../util/tooltip'const height = 368const marginTop = 16@@ -576,8 +577,9 @@ const PersistentTooltipContents = ({<div className="flex flex-row gap-x-2 mt-2">{!!annotationDatetime && canAddAnnotation && (<Button+ theme="secondary"size="xs"- className="flex-auto bg-gray-600/70 border-gray-600/70 border-transparent hover:bg-gray-600"+ className="flex-auto"onClick={() => {closeTooltip()setModal({@@ -595,8 +597,9 @@ const PersistentTooltipContents = ({)}{!!zoomDate && (<Button+ theme="secondary"size="xs"- className="flex-auto bg-gray-600/70 border-gray-600/70 border-transparent hover:bg-gray-600"+ className="flex-auto"onClick={() => onZoomToPeriod(zoomDate)}>{`View ${interval}`}</Button>)}@@ -621,14 +624,14 @@ const HoveredTooltipContents = ({annotationDatetime={annotationDatetime}/>)}- <hr className="border-gray-600 dark:border-gray-800 my-1" />+ <hr className="border-gray-200 dark:border-gray-800 my-1" /><div className="flex flex-col gap-y-0.5">{!!zoomDate && (- <div className="text-gray-300 dark:text-gray-400 text-xs">+ <div className="text-gray-500 dark:text-gray-400 text-xs">{`Click to view ${interval}`}</div>)}- <div className="text-gray-300 dark:text-gray-400 text-xs">+ <div className="text-gray-500 dark:text-gray-400 text-xs">{canAddAnnotation? 'Right click for more actions': 'Right click to pin tooltip'}@@ -641,8 +644,11 @@ const HoveredTooltipContents = ({const isTouchEvent = (event: unknown) =>event instanceof PointerEvent && event.pointerType === 'touch'-const mainGraphTooltipClassName =- 'absolute bg-gray-800 dark:bg-gray-950 py-3 px-4 rounded-md shadow shadow-gray-200 dark:shadow-gray-850 w-max max-w-[220px] sm:max-w-[300px]'+const mainGraphTooltipClassName = tooltipClassName({+ size: 'sm',+ theme: 'darker',+ className: 'absolute w-max max-w-[220px] sm:max-w-[300px]'+})type MainGraphTooltipProps = {metric: Metric@@ -702,7 +708,7 @@ const MainGraphTooltip = ({})}><aside- className="text-sm font-normal text-gray-100 flex flex-col gap-2"+ className="font-normal flex flex-col gap-2"data-testid="graph-tooltip"><div className="flex justify-between items-center rounded-sm">@@ -714,7 +720,7 @@ const MainGraphTooltip = ({</div>{comparison.isDefined && typeof change === 'number' && (<ChangeArrow- className="text-xs/6 font-medium text-white whitespace-nowrap"+ className="text-xs/6 font-medium whitespace-nowrap"metric={metric}change={change}/>@@ -724,7 +730,7 @@ const MainGraphTooltip = ({{main.isDefined && (<div className="flex flex-row justify-between items-center"><div className="flex items-center mr-4">- <div className="size-2 flex-none mr-2 rounded-full bg-indigo-400" />+ <div className="size-2 flex-none mr-2 rounded-full bg-indigo-500 dark:bg-indigo-400" /><divdata-testid="main-time-label"className="whitespace-nowrap"@@ -752,7 +758,7 @@ const MainGraphTooltip = ({{comparison.isDefined && (<div className="flex flex-row justify-between items-center"><div className="flex items-center mr-4">- <div className="size-2 flex-none mr-2 rounded-full bg-gray-500"></div>+ <div className="size-2 flex-none mr-2 rounded-full bg-indigo-200 dark:bg-indigo-800"></div><div className="whitespace-nowrap">{getFullBucketLabel(comparison.timeLabel, {isRealtime,diff --git a/assets/js/dashboard/stats/locations/map-tooltip.tsx b/assets/js/dashboard/stats/locations/map-tooltip.tsxindex 9e28c5c3f9..937594d603 100644--- a/assets/js/dashboard/stats/locations/map-tooltip.tsx+++ b/assets/js/dashboard/stats/locations/map-tooltip.tsx@@ -1,5 +1,5 @@-import classNames from 'classnames'import React from 'react'+import { tooltipClassName } from '../../util/tooltip'interface MapTooltipProps {name: string@@ -11,31 +11,20 @@ interface MapTooltipProps {export const MapTooltip = ({ name, value, label, x, y }: MapTooltipProps) => (<div- className={classNames(- 'absolute',- 'z-50',- 'p-2',- 'translate-x-2',- 'translate-y-2',- 'pointer-events-none',- 'rounded-sm',- 'bg-white',- 'dark:bg-gray-800',- 'shadow',- 'dark:border-gray-850',- 'dark:text-gray-200',- 'dark:shadow-gray-850',- 'shadow-gray-200'- )}+ className={tooltipClassName({+ size: 'sm',+ theme: 'darker',+ className: 'absolute z-50 translate-x-2 translate-y-2 pointer-events-none'+ })}style={{left: x,top: y}}>- <div className="text-sm font-semibold">{name}</div>- <div className="flex items-center gap-x-1 text-sm">- <strong className="dark:text-indigo-400">{value}</strong>- {label}+ <div className="font-semibold">{name}</div>+ <div className="flex items-center gap-x-1">+ <span className="font-semibold">{value}</span>+ <span className="font-normal">{label}</span></div></div>)diff --git a/assets/js/dashboard/stats/locations/map.tsx b/assets/js/dashboard/stats/locations/map.tsxindex 724c4e47e5..aba02929d8 100644--- a/assets/js/dashboard/stats/locations/map.tsx+++ b/assets/js/dashboard/stats/locations/map.tsx@@ -23,12 +23,12 @@ import { CountryData, MetricLabel, WorldMapSvg } from './world-map-svg'function getMetricLabel(dashboardState: DashboardState): MetricLabel {if (hasConversionGoalFilter(dashboardState)) {- return { singular: 'Conversion', plural: 'Conversions' }+ return { singular: 'conversion', plural: 'conversions' }}if (isRealTimeDashboard(dashboardState)) {- return { singular: 'Current visitor', plural: 'Current visitors' }+ return { singular: 'current visitor', plural: 'current visitors' }}- return { singular: 'Visitor', plural: 'Visitors' }+ return { singular: 'visitor', plural: 'visitors' }}const WorldMap = ({diff --git a/assets/js/dashboard/util/tooltip.tsx b/assets/js/dashboard/util/tooltip.tsxindex d2b9bcda68..ae25fd5328 100644--- a/assets/js/dashboard/util/tooltip.tsx+++ b/assets/js/dashboard/util/tooltip.tsx@@ -10,10 +10,36 @@ import { usePopper } from 'react-popper'import classNames from 'classnames'import { createPortal } from 'react-dom'+export type TooltipSize = 'xs' | 'sm'++const tooltipSizes: Record<TooltipSize, string> = {+ xs: 'tooltip-xs',+ sm: 'tooltip-sm'+}++export type TooltipTheme = 'default' | 'darker'++const tooltipThemes: Record<TooltipTheme, string | null> = {+ default: null,+ darker: 'tooltip-theme-darker'+}++export const tooltipClassName = ({+ size = 'xs',+ theme = 'default',+ className+}: {+ size?: TooltipSize+ theme?: TooltipTheme+ className?: string+} = {}): string =>+ classNames('tooltip', tooltipSizes[size], tooltipThemes[theme], className)+export function Tooltip({children,info,className,+ size = 'xs',onClick,boundary,containerRef,@@ -22,6 +48,7 @@ export function Tooltip({info: ReactNodechildren: ReactNodeclassName?: string+ size?: TooltipSizeonClick?: () => void/** if provided, the tooltip is confined to the particular element */boundary?: HTMLElement | null@@ -44,7 +71,7 @@ export function Tooltip({{name: 'offset',options: {- offset: [0, 6]+ offset: [0, 8]}},...(boundary@@ -88,6 +115,7 @@ export function Tooltip({</div>{info && visible && (<TooltipMessage+ size={size}containerRef={containerRef}popperStyle={styles.popper}popperAttributes={attributes.popper}@@ -104,6 +132,7 @@ export function Tooltip({}function TooltipMessage({+ size,containerRef,popperStyle,popperAttributes,@@ -113,6 +142,7 @@ function TooltipMessage({onMouseLeave,children}: {+ size: TooltipSizecontainerRef?: RefObject<HTMLElement>popperStyle: CSSPropertiespopperAttributes?: Record<string, string>@@ -127,12 +157,15 @@ function TooltipMessage({ref={setPopperElement}style={popperStyle}{...popperAttributes}- className={classNames(- 'z-[99] [body:has(.modal.is-open)_&]:z-[1000] px-2 py-1 rounded-sm text-sm text-gray-100 font-medium bg-gray-800 dark:bg-gray-700',- interactive- ? 'before:absolute before:inset-x-0 before:top-full before:h-1.5 [&[data-popper-placement^=bottom]]:before:top-auto [&[data-popper-placement^=bottom]]:before:bottom-full'- : 'pointer-events-none'- )}+ className={tooltipClassName({+ size,+ className: classNames(+ 'z-[99] [body:has(.modal.is-open)_&]:z-[1000]',+ interactive+ ? 'before:absolute before:inset-x-0 before:top-full before:h-2 [&[data-popper-placement^=bottom]]:before:top-auto [&[data-popper-placement^=bottom]]:before:bottom-full'+ : 'pointer-events-none'+ )+ })}role="tooltip"onMouseEnter={onMouseEnter}onMouseLeave={onMouseLeave}diff --git a/lib/plausible_web/components/billing/billing.ex b/lib/plausible_web/components/billing/billing.exindex 12a021629b..399eb348e6 100644--- a/lib/plausible_web/components/billing/billing.ex+++ b/lib/plausible_web/components/billing/billing.ex@@ -151,7 +151,7 @@ defmodule PlausibleWeb.Components.Billing do<:tooltip_content>View billing period in dashboard</:tooltip_content><.linkhref={@total_link}- class="text-indigo-500 hover:text-indigo-600"+ class="text-indigo-500 hover:text-indigo-600 dark:text-indigo-400 dark:hover:text-indigo-300"data-test-id="total-pageviews-dashboard-link"x-on:click.stop>@@ -189,7 +189,7 @@ defmodule PlausibleWeb.Components.Billing do<:tooltip_content>View billing period in dashboard</:tooltip_content><.linkhref={dashboard_url(site.domain, @usage.date_range)}- class="shrink-0 text-indigo-500 hover:text-indigo-600"+ class="shrink-0 text-indigo-500 hover:text-indigo-600 dark:text-indigo-400 dark:hover:text-indigo-300"><.external_link_icon class="ml-0.5 size-3.5 [&_path]:stroke-2" /></.link>diff --git a/lib/plausible_web/components/generic.ex b/lib/plausible_web/components/generic.exindex 8a2797ebcc..457bc02b4b 100644--- a/lib/plausible_web/components/generic.ex+++ b/lib/plausible_web/components/generic.ex@@ -200,7 +200,7 @@ defmodule PlausibleWeb.Components.Generic dotarget="_blank"class="flex">- <Heroicons.information_circle class="text-gray-400 dark:text-indigo-500 size-4.5 hover:text-indigo-500 dark:hover:text-indigo-400 transition-colors duration-150" />+ <Heroicons.information_circle class="text-gray-400 dark:text-indigo-400 size-4.5 hover:text-indigo-500 dark:hover:text-indigo-300" /></a></.tooltip></div>@@ -662,10 +662,16 @@ defmodule PlausibleWeb.Components.Generic do"""end+ @tooltip_sizes %{+ "xs" => "tooltip-xs",+ "sm" => "tooltip-sm"+ }+attr(:sticky?, :boolean, default: true)attr(:enabled?, :boolean, default: true)attr(:centered?, :boolean, default: false)attr(:interactive?, :boolean, default: true)+ attr(:size, :string, default: "xs", values: Map.keys(@tooltip_sizes))attr(:testid, :string, default: nil)slot(:inner_block, required: true)slot(:tooltip_content, required: true)@@ -698,7 +704,8 @@ defmodule PlausibleWeb.Components.Generic doassign(assigns,wrapper_data: wrapper_data,show_inner: show_inner,- tooltip_position_classes: tooltip_position_classes+ tooltip_position_classes: tooltip_position_classes,+ size_class: @tooltip_sizes[assigns.size])if assigns.enabled? do@@ -721,7 +728,7 @@ defmodule PlausibleWeb.Components.Generic dox-transition:leave-start="opacity-100"x-transition:leave-end="opacity-0">- <div class="bg-gray-800 text-white rounded-sm px-2.5 py-1.5 text-xs font-medium whitespace-normal">+ <div class={["tooltip", @size_class, "whitespace-normal"]}>{render_slot(@tooltip_content)}</div></div>diff --git a/lib/plausible_web/components/settings.ex b/lib/plausible_web/components/settings.exindex 2528f52314..d1fdfe7b9d 100644--- a/lib/plausible_web/components/settings.ex+++ b/lib/plausible_web/components/settings.ex@@ -165,7 +165,7 @@ defmodule PlausibleWeb.Components.Settings do<.docs_info :if={@docs} slug={@docs} /><.tooltip :if={@tooltip} centered?={true}><:tooltip_content>{@tooltip}</:tooltip_content>- <Heroicons.information_circle class="size-4.5 text-gray-400 dark:text-gray-500" />+ <Heroicons.information_circle class="size-4.5 text-gray-400 dark:text-indigo-400 hover:text-indigo-500 dark:hover:text-indigo-300" /></.tooltip></div>"""diff --git a/lib/plausible_web/live/goal_settings/form.ex b/lib/plausible_web/live/goal_settings/form.exindex 52d5177f03..6bb02207d0 100644--- a/lib/plausible_web/live/goal_settings/form.ex+++ b/lib/plausible_web/live/goal_settings/form.ex@@ -545,7 +545,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do<PlausibleWeb.Components.Billing.upgrade_call_to_actioncurrent_user={@current_user}current_team={@site_team}- link_class="!inline !text-indigo-400 hover:!text-indigo-300"+ link_class="!inline dark:!text-indigo-400 dark:hover:!text-indigo-300"/></:tooltip_content><.toggle_switch@@ -726,7 +726,7 @@ defmodule PlausibleWeb.Live.GoalSettings.Form do<PlausibleWeb.Components.Billing.upgrade_call_to_actioncurrent_user={@current_user}current_team={@site_team}- link_class="!inline !text-indigo-400 hover:!text-indigo-300"+ link_class="!inline dark:!text-indigo-400 dark:hover:!text-indigo-300"/></:tooltip_content><PlausibleWeb.Components.Generic.toggle_switchdiff --git a/lib/plausible_web/live/goal_settings/list.ex b/lib/plausible_web/live/goal_settings/list.exindex 35beb6a708..261b29f4c8 100644--- a/lib/plausible_web/live/goal_settings/list.ex+++ b/lib/plausible_web/live/goal_settings/list.ex@@ -282,8 +282,8 @@ defmodule PlausibleWeb.Live.GoalSettings.List do<:tooltip_content><div class="-mx-1 flex flex-col gap-1 text-xs"><div :for={{key, value} <- @goal.custom_props} class="truncate">- <span class="bg-white/20 px-1 py-0.5 rounded-sm">{key}</span>- is <span class="bg-white/20 px-1 py-0.5 rounded-sm">{value}</span>+ <span class="bg-gray-100 dark:bg-white/20 px-1 py-0.5 rounded-sm">{key}</span>+ is <span class="bg-gray-100 dark:bg-white/20 px-1 py-0.5 rounded-sm">{value}</span></div></div></:tooltip_content>diff --git a/lib/plausible_web/live/two_factor_settings.ex b/lib/plausible_web/live/two_factor_settings.exindex a04df4cf9d..ae665b6077 100644--- a/lib/plausible_web/live/two_factor_settings.ex+++ b/lib/plausible_web/live/two_factor_settings.ex@@ -34,13 +34,9 @@ defmodule PlausibleWeb.Live.TwoFactorSettings do<p class="mt-2 text-gray-600 text-sm dark:text-gray-400">Lost your recovery codes?- <button- type="button"- phx-click={Prima.Modal.JS.open("regenerate-2fa-modal")}- class="underline text-indigo-600"- >+ <.styled_link phx-click={Prima.Modal.JS.open("regenerate-2fa-modal")}>Generate new- </button>+ </.styled_link></p><PrimaModal.modal