21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
import { ArPagePreview } from '~/components/ui/ar-page-preview';
|
|
import { Text } from '~/components/ui/text';
|
|
import { SAMPLE_MODEL_NAME } from '~/data/projects/constants';
|
|
import type { ArPageLayout, BrandIdentity, ButtonStyle } from '~/types/project';
|
|
|
|
// Live AR page preview beside the project form
|
|
export function ProjectPreview({ brand, button, layout }: { brand: BrandIdentity; button: ButtonStyle; layout: ArPageLayout }) {
|
|
return (
|
|
<div className='hidden flex-col items-center gap-3.5 border-l border-border-divider bg-surface-sunken px-6 pt-[22px] pb-[26px] md:flex'>
|
|
<div className='flex items-baseline justify-between self-stretch'>
|
|
<Text as='span' variant='caption-strong'>
|
|
Live preview
|
|
</Text>
|
|
<Text as='span' variant='meta'>AR page</Text>
|
|
</div>
|
|
{/* Shorter on short screens, so it always fits beside the scrolling form */}
|
|
<ArPagePreview brand={brand} modelName={SAMPLE_MODEL_NAME} button={button} layout={layout} className='h-[min(560px,calc(100dvh-18rem))] w-[270px]' />
|
|
</div>
|
|
);
|
|
}
|