import { memo } from 'react'; /** * 라이트박스 인디케이터 컴포넌트 * 이미지 갤러리에서 현재 위치를 표시하는 슬라이딩 점 인디케이터 * CSS transition 사용으로 GPU 가속 */ const LightboxIndicator = memo(function LightboxIndicator({ count, currentIndex, goToIndex, width = 200 }) { const halfWidth = width / 2; const translateX = -(currentIndex * 18) + halfWidth - 6; return (
{/* 양옆 페이드 그라데이션 */}
{/* 슬라이딩 컨테이너 - CSS transition으로 GPU 가속 */}
{Array.from({ length: count }).map((_, i) => (
); }); export default LightboxIndicator;