wip
This commit is contained in:
@@ -149,16 +149,12 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
|
||||
const responsiveSizeValue = getResponsiveSize();
|
||||
|
||||
// Get touch target size
|
||||
// Get touch target size - fixed for hydration
|
||||
const getTouchTargetClasses = () => {
|
||||
if (!touchTarget) return '';
|
||||
|
||||
if (typeof window === 'undefined') return '';
|
||||
|
||||
const viewport = getViewport();
|
||||
const targetSize = getTouchTargetSize(viewport.isMobile, viewport.isLargeDesktop);
|
||||
|
||||
// Ensure minimum touch target
|
||||
// Always return the same classes to avoid hydration mismatch
|
||||
// The touch target is a design requirement that should be consistent
|
||||
return `min-h-[44px] min-w-[44px]`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user