fix(ui): drag slider only via arrows handle on phones and make whole trendy bento card clickable

This commit is contained in:
2026-11-05 13:10:05 +05:30
parent 3d147dd3de
commit ee518ff451
5 changed files with 133 additions and 135 deletions
@@ -257,9 +257,10 @@ export function TrendyBentoSection({
: 'col-span-1 aspect-square rounded-[36px] sm:rounded-[42px]';
return (
<div
<Link
key={tile.id}
className={`group relative flex flex-col justify-between overflow-hidden bg-slate-950 border border-slate-900/[0.08] shadow-cream-sm transition-[transform] duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] hover:-translate-y-1.5 transform-gpu will-change-transform ${tileClasses}`}
href={tile.href}
className={`group relative flex flex-col justify-between overflow-hidden bg-slate-950 border border-slate-900/[0.08] shadow-cream-sm transition-[transform] duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] hover:-translate-y-1.5 transform-gpu will-change-transform cursor-pointer ${tileClasses}`}
>
{/* GPU-composited shadow elevation layer */}
<div
@@ -286,9 +287,10 @@ export function TrendyBentoSection({
{/* Android Quick Settings Size Toggle Button (1x1 to 2x1) */}
<button
type="button"
onClick={(e) => toggleTileSize(tile.id, e)}
title={tile.isWide ? 'Shrink tile' : 'Expand tile'}
className="w-9 h-9 rounded-2xl bg-white/90 hover:bg-white text-slate-800 shadow-md flex items-center justify-center transition-[transform,background-color] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] hover:scale-110 active:scale-95"
className="w-9 h-9 rounded-2xl bg-white/90 hover:bg-white text-slate-800 shadow-md flex items-center justify-center transition-[transform,background-color] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] hover:scale-110 active:scale-95 z-30"
>
{tile.isWide ? (
<Minimize2 className="w-4 h-4 text-blue-600" />
@@ -312,15 +314,14 @@ export function TrendyBentoSection({
{tile.description}
</p>
<Link
href={tile.href}
<div
className="mt-2 inline-flex items-center gap-1.5 text-xs font-display font-bold text-cyan-300 group-hover:text-white transition-colors"
>
<span>{tile.cta}</span>
<ArrowRight className="w-3.5 h-3.5 transition-transform group-hover:translate-x-1" />
</Link>
</div>
</div>
</div>
</Link>
);
})}
</div>