feat: add live AR page preview to the project form
This commit is contained in:
parent
4629d86289
commit
bf3ba351d4
20
app/components/projects/form/project-preview.tsx
Normal file
20
app/components/projects/form/project-preview.tsx
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
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>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user