Skip to content

Commit c4ce3d7

Browse files
Fix mobile modal tab buttons: prevent text wrapping and ensure equal sizing
- Reordered tabs to Case Study, Gallery, Prototype - Added whitespace-nowrap to prevent text cutoff on mobile - Changed to items-stretch for equal button heights - Reduced gap from gap-3 to gap-2 for better mobile fit - Added responsive text sizing (text-xs on mobile, sm:text-sm on larger screens) - Ensures consistent button appearance across all products on mobile
1 parent 29b452e commit c4ce3d7

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

components/portfolio/PortfolioModal.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ export default function PortfolioModal({
270270
className="px-6 pt-4 pb-6 overflow-y-auto flex-1 min-h-0 overscroll-contain"
271271
>
272272

273-
<div className="mb-6 flex items-center gap-3">
273+
<div className="mb-6 flex items-stretch gap-2">
274274
{hasCaseStudy && (
275275
<button
276276
type="button"
277277
onClick={() => setView('caseStudy')}
278278
className={clsx(
279-
'cta-button flex-1 text-center',
279+
'cta-button flex-1 text-center whitespace-nowrap text-xs sm:text-sm',
280280
view === 'caseStudy'
281281
? 'bg-cta-brass text-bg-primary'
282282
: 'border-text-base/15 text-text-base/60 hover:border-cta-brass'
@@ -287,12 +287,26 @@ export default function PortfolioModal({
287287
</button>
288288
)}
289289

290+
<button
291+
type="button"
292+
onClick={() => setView('gallery')}
293+
className={clsx(
294+
'cta-button flex-1 text-center whitespace-nowrap text-xs sm:text-sm',
295+
view === 'gallery'
296+
? 'bg-cta-brass text-bg-primary'
297+
: 'border-text-base/15 text-text-base/60 hover:border-cta-brass'
298+
)}
299+
aria-pressed={view === 'gallery'}
300+
>
301+
Gallery
302+
</button>
303+
290304
{hasPrototype && (
291305
<button
292306
type="button"
293307
onClick={() => setView('prototype')}
294308
className={clsx(
295-
'cta-button flex-1 text-center',
309+
'cta-button flex-1 text-center whitespace-nowrap text-xs sm:text-sm',
296310
view === 'prototype'
297311
? 'bg-cta-brass text-bg-primary'
298312
: 'border-text-base/15 text-text-base/60 hover:border-cta-brass'
@@ -302,20 +316,6 @@ export default function PortfolioModal({
302316
Prototype
303317
</button>
304318
)}
305-
306-
<button
307-
type="button"
308-
onClick={() => setView('gallery')}
309-
className={clsx(
310-
'cta-button flex-1 text-center',
311-
view === 'gallery'
312-
? 'bg-cta-brass text-bg-primary'
313-
: 'border-text-base/15 text-text-base/60 hover:border-cta-brass'
314-
)}
315-
aria-pressed={view === 'gallery'}
316-
>
317-
Gallery
318-
</button>
319319
</div>
320320

321321
{view !== 'caseStudy' &&

0 commit comments

Comments
 (0)