맥락: - /space Setup Drawer가 설정 패널처럼 보여 프리미엄 라운지 톤이 약했습니다. - 첫 진입에서 사용자가 설명보다 리추얼 흐름으로 행동하도록 시각 계층을 조정할 필요가 있었습니다. 변경사항: - Setup Drawer 헤더 카피를 감성 톤으로 교체하고 섹션 레이블을 자연어 중심으로 정리했습니다. - Space 썸네일 카드에 텍스트 전용 하단 그라데이션을 적용하고 선택 테두리/글로우를 은은하게 낮췄습니다. - Goal 입력 라벨을 한 조각 중심 카피로 변경하고 보조 힌트를 추가했습니다. - Goal 추천 칩을 기본 4개 + 더보기 토글로 바꿔 부담을 줄였습니다. - Sound 프리셋을 무거운 버튼형에서 가벼운 pill 칩형으로 정리했습니다. - Goal 미입력 시 시작 버튼 상단에 상태 안내 문구를 추가했습니다. 검증: - npx tsc --noEmit - npm run build 세션-상태: Setup Drawer가 설정 패널보다 입장 의식 흐름에 맞는 톤으로 정리되었습니다. 세션-다음: 실제 화면 확인 후 타이포/간격 미세 조정 여부를 판단합니다. 세션-리스크: 더보기 토글 상태는 현재 세션 동안만 유지됩니다.
52 lines
1.9 KiB
TypeScript
52 lines
1.9 KiB
TypeScript
import { getRoomCardBackgroundStyle, type RoomTheme } from '@/entities/room';
|
|
import { cn } from '@/shared/lib/cn';
|
|
|
|
interface SpaceSelectCarouselProps {
|
|
rooms: RoomTheme[];
|
|
selectedRoomId: string;
|
|
onSelect: (roomId: string) => void;
|
|
}
|
|
|
|
export const SpaceSelectCarousel = ({
|
|
rooms,
|
|
selectedRoomId,
|
|
onSelect,
|
|
}: SpaceSelectCarouselProps) => {
|
|
return (
|
|
<div className="-mx-1 overflow-x-auto px-1 pb-1">
|
|
<div className="flex min-w-full gap-2.5">
|
|
{rooms.map((room) => {
|
|
const selected = room.id === selectedRoomId;
|
|
|
|
return (
|
|
<button
|
|
key={room.id}
|
|
type="button"
|
|
onClick={() => onSelect(room.id)}
|
|
className={cn(
|
|
'group relative h-24 min-w-[138px] overflow-hidden rounded-xl border text-left sm:min-w-[148px]',
|
|
selected
|
|
? 'border-sky-200/38 shadow-[0_0_0_1px_rgba(186,230,253,0.2),0_0_10px_rgba(56,189,248,0.12)]'
|
|
: 'border-white/16 hover:border-white/24',
|
|
)}
|
|
style={getRoomCardBackgroundStyle(room)}
|
|
aria-label={`${room.name} 선택`}
|
|
>
|
|
<span className="absolute inset-x-0 bottom-0 h-[56%] bg-[linear-gradient(180deg,rgba(2,6,23,0)_0%,rgba(2,6,23,0.2)_52%,rgba(2,6,23,0.24)_100%)]" />
|
|
{selected ? (
|
|
<span className="absolute right-2 top-2 inline-flex h-5 w-5 items-center justify-center rounded-full border border-sky-200/64 bg-sky-200/24 text-[10px] font-semibold text-sky-50">
|
|
✓
|
|
</span>
|
|
) : null}
|
|
<div className="absolute inset-x-2 bottom-2">
|
|
<p className="truncate text-sm font-semibold text-white/96">{room.name}</p>
|
|
<p className="truncate text-[11px] text-white/66">{room.vibeLabel}</p>
|
|
</div>
|
|
</button>
|
|
);
|
|
})}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|