forked from rajun/ar-test
27 lines
1.2 KiB
TypeScript
27 lines
1.2 KiB
TypeScript
import { OpenScreen } from '~/components/auth/showcase/open-screen';
|
|
import { PlaceScreen } from '~/components/auth/showcase/place-screen';
|
|
import { ScanScreen } from '~/components/auth/showcase/scan-screen';
|
|
import { PhoneFrame } from '~/components/ui/phone-frame';
|
|
|
|
// One screen per LOGIN_STORY step, in the same order
|
|
const SCREENS = [
|
|
{ Screen: ScanScreen, tone: 'dark' },
|
|
{ Screen: OpenScreen, tone: 'light' },
|
|
{ Screen: PlaceScreen, tone: 'dark' },
|
|
] as const;
|
|
|
|
// Decorative: hidden from assistive tech and never focusable. Tilted only in the wide layout.
|
|
export function StoryPhone({ step }: { step: number }) {
|
|
const { Screen, tone } = SCREENS[step] ?? SCREENS[0];
|
|
return (
|
|
<div aria-hidden='true' inert className='relative shrink-0 perspective-[1600px]'>
|
|
<span className='absolute inset-x-[8%] -bottom-6.5 h-10 rounded-full bg-radial from-shadow/70 to-transparent to-70% blur-sm' />
|
|
<PhoneFrame tone={tone} className='h-[540px] w-[260px] wide:h-[600px] wide:w-[290px] wide:rotate-x-3 wide:-rotate-y-12'>
|
|
<div key={step} className='flex min-h-0 flex-1 animate-screen-in flex-col'>
|
|
<Screen />
|
|
</div>
|
|
</PhoneFrame>
|
|
</div>
|
|
);
|
|
}
|