Fix mobile tooltips

This commit is contained in:
Sam Becker 2025-06-04 17:13:04 -05:00
parent cd6f9ab775
commit 7da49cb3cc
2 changed files with 4 additions and 3 deletions

View File

@ -16,10 +16,10 @@ export default function MenuSurface({
<div <div
ref={ref} ref={ref}
className={clsx( className={clsx(
color === undefined && 'component-surface shadow-xs dark:shadow-md', color === undefined && 'component-surface shadow-sm dark:shadow-md',
color === 'light' && 'component-surface-light shadow-xs', color === 'light' && 'component-surface-light shadow-sm',
color === 'dark' && 'component-surface-dark shadow-md', color === 'dark' && 'component-surface-dark shadow-md',
color === 'frosted' && 'component-surface-frosted shadow-xs', color === 'frosted' && 'component-surface-frosted shadow-sm',
'px-2 py-1.5 max-w-[14rem]', 'px-2 py-1.5 max-w-[14rem]',
'text-[0.8rem] leading-tight', 'text-[0.8rem] leading-tight',
'text-balance text-center', 'text-balance text-center',

View File

@ -6,6 +6,7 @@ export default function useSupportsHover() {
useEffect(() => { useEffect(() => {
const mql = window.matchMedia('(hover: hover)'); const mql = window.matchMedia('(hover: hover)');
setSupportsHover(mql.matches);
const listener = (e: MediaQueryListEvent) => { const listener = (e: MediaQueryListEvent) => {
setSupportsHover(e.matches); setSupportsHover(e.matches);
}; };