Files
HaBit/components/pet/parallax-room-background.tsx
pricewowen 5ebcf33bca Polish quiz completion UX, room PNG backgrounds, and habits list order
Polish quiz completion UX, rooms, and app layout.
2026-05-24 07:09:40 -06:00

34 lines
722 B
TypeScript

"use client";
import {
getRoomBackground,
type RoomBackgroundId,
} from "@/lib/room-backgrounds";
import { cn } from "@/lib/utils";
type ParallaxRoomBackgroundProps = {
roomId: RoomBackgroundId;
className?: string;
};
export function ParallaxRoomBackground({
roomId,
className,
}: ParallaxRoomBackgroundProps) {
const room = getRoomBackground(roomId);
return (
<div
className={cn("absolute inset-0 z-0 overflow-hidden bg-lcd-bg", className)}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={room.sceneImage}
alt=""
aria-hidden
className="absolute inset-0 size-full object-cover image-pixelated"
/>
</div>
);
}