import React, { useState, useEffect } from 'react'; import { PhoneFrame } from './sketchy'; import { screenGroups, type Screen } from '../screens'; import { ThemeToggle } from './ThemeToggle'; function useIsMobile(breakpoint = 768) { const [isMobile, setIsMobile] = useState(window.innerWidth < breakpoint); useEffect(() => { const handleResize = () => setIsMobile(window.innerWidth < breakpoint); window.addEventListener('resize', handleResize); return () => window.removeEventListener('resize', handleResize); }, [breakpoint]); return isMobile; } interface GalleryProps { onSelectScreen: (screenId: string) => void; onShowStories: () => void; onShowSpecs?: () => void; } const MIN_SCALE = 0.32; const MAX_SCALE = 0.75; const DEFAULT_SCALE = 0.5; export function Gallery({ onSelectScreen, onShowStories, onShowSpecs }: GalleryProps) { const [scale, setScale] = useState(DEFAULT_SCALE); const isMobile = useIsMobile(); return (

Festipod

Cliquez sur un écran pour le prévisualiser

{/* User Stories button */} {/* Specs BDD button */} {onShowSpecs && ( )} {/* Zoom control - hide on mobile */} {!isMobile && (
Zoom setScale(Number(e.target.value) / 100)} style={{ width: 100, accentColor: 'var(--tool-text)', }} /> {Math.round(scale * 100)}%
)} {/* Theme toggle */}
{screenGroups.map((group) => (
{/* Group header */}

{group.name}

{/* Horizontal scrolling row */}
{group.screens.map((screen) => ( onSelectScreen(screen.id)} /> ))}
))}
); } interface GalleryItemProps { screen: Screen; scale: number; onClick: () => void; } function GalleryItem({ screen, scale, onClick }: GalleryItemProps) { const ScreenComponent = screen.component; const phoneWidth = 375; const phoneHeight = 812; return (
{}} />

{screen.name}

); }