Fix mobile tooltips
This commit is contained in:
parent
cd6f9ab775
commit
7da49cb3cc
@ -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',
|
||||||
|
|||||||
@ -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);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user